corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » HTML/Java Geeks - Possible solution?


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author HTML/Java Geeks - Possible solution?
Jambo
Member

Registered: 8th Sep 01
Location: Maidenhead, Drives: VXR Arctic
User status: Offline
2nd Apr 14 at 12:41   View User's Profile U2U Member Reply With Quote

Got to knock something up for work, I am not in any way shape or form fluent in any design language, I have briefly used HTML before on Google sites to do very, very basic things before like Hyperlinks etc...

Wondering if you guys know if this is possible?


We have a reg lookup system for use internally and require a slightly easier method of use.

Currently, we have a link that provides raw data in a messy format but it is legible. The problem is to access it we just have a URL, the URL contains a random registration and when you click on the URL/Link it takes you straight to the vehicle information for this random reg. It is simple to use, you just delete the random reg out of the URL, and input the one you are after information for, then press enter/go and it populates.

I was thinking of some sort of box, via Google sites that the end user simply inputs the Registration and presses "GO" and that function of go, uses the reg that was inputted in the text field to complete the URL and access the data. Thus avoiding messing around with the URL.

Im a n00b to these sort of things, is this even possible? If it makes a difference the reg is not at the end of the URL annoyingly, its mid way through.

Is what I am asking possible? Or do I need to be a jeans and tshirt wearing developer to do this.....


Halp.

[Edited on 02-04-2014 by Jambo]
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
2nd Apr 14 at 12:46   View Garage View User's Profile U2U Member Reply With Quote

Piece of cake.

Any HTML form with a GET method can be adapted with your URL.

code:


<form action="http://www.regcheck.com/path/to/script.php" method="get">
Reg: <input type="text" name="reg"><br>
<input type="hidden" name="authcode" value="abc123">
<input type="submit" value="Submit">
</form>




Form tag - tells the script where to direct to.

First Input tag - asks for the reg

Hidden Input tag(s) - contain anything else you need on the URL that you don't want to have to ask for
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
2nd Apr 14 at 12:49   View Garage View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Jambo
If it makes a difference the reg is not at the end of the URL annoyingly, its mid way through.


Doesn't make a difference

[Edited on 02-04-2014 by Ian]
Jambo
Member

Registered: 8th Sep 01
Location: Maidenhead, Drives: VXR Arctic
User status: Offline
2nd Apr 14 at 12:56   View User's Profile U2U Member Reply With Quote

Ooooo

Going to have a play, if this works, will personally kiss you.
Jambo
Member

Registered: 8th Sep 01
Location: Maidenhead, Drives: VXR Arctic
User status: Offline
2nd Apr 14 at 13:03   View User's Profile U2U Member Reply With Quote

The username and password to our account is contained within the URL, will this affect security with the GET function?

Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
2nd Apr 14 at 13:19   View Garage View User's Profile U2U Member Reply With Quote

You're only doing the same as you are now, just with a form.

The form is creating that URL for you.

So whatever problems you had in the past with user/pass being stored in browser history etc. are still present.

You can also host on your computer, doesn't need to be uploaded anywhere. Although the hosting server wouldn't see the user/pass as that goes straight from your browser to the server which is accepting the URL.

No different really. Just not manually populated.

But yeah, file can go on your desktop somewhere, just needs a .htm extension so it'll open in a browser. But it contains the complete path to the reg plate script - therefore can be called from anywhere else.
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
2nd Apr 14 at 13:20   View Garage View User's Profile U2U Member Reply With Quote

In fact - you might want to store the user/pass as hidden input tags - in which case yeah - don't upload it anywhere you don't want those public.

Probably best to make the file and pass it round and have every save it locally unless its loads and loads of people.
Jambo
Member

Registered: 8th Sep 01
Location: Maidenhead, Drives: VXR Arctic
User status: Offline
2nd Apr 14 at 13:22   View User's Profile U2U Member Reply With Quote

Cheers Ian, just checking.

I have entered it into Google sites, it "works" but keep getting http status400 errors. The URL looks like half is missing. Trying to switch it around till it works. Exactly what I was looking for though Thanks
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
2nd Apr 14 at 13:22   View Garage View User's Profile U2U Member Reply With Quote

Like this inside the form:

code:
<input type="hidden" name="user" value="jambo1">
<input type="hidden" name="pass" value="kissme">



That one I probably wouldn't upload anywhere I didn't trust fully.
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
2nd Apr 14 at 13:25   View Garage View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Jambo
The URL looks like half is missing.


Get a good URL and cut it up between the &, for example

http://www.regcheck.com/path/to/script.php?name=jambo1&pass=kissme&reg=AB53ABC&lang=en&page=1&name=value

Becomes

http://www.regcheck.com/path/to/script.php
?
name=jambo1
&
pass=kissme
&
reg=AB53ABC
&
lang=en
&
page=1
&
name=value

Each one of the name/value pairs needs to be either a input type=text or probably a hidden if it won't change

So

name=jambo1
pass=kissme
reg=AB53ABC
lang=en
page=1
name=value

Becomes

<input type="hidden" name="name" value="jambo1">
<input type="hidden" name="pass" value="kissme">
<input type="text" name="reg" value="">
<input type="hidden" name="lang" value="en">
<input type="hidden" name="page" value="1">
<input type="hidden" name="name" value="value">

The & gets discarded, they're just to separate the pairs in a completed URL

[Edited on 02-04-2014 by Ian]
Jambo
Member

Registered: 8th Sep 01
Location: Maidenhead, Drives: VXR Arctic
User status: Offline
2nd Apr 14 at 13:34   View User's Profile U2U Member Reply With Quote

Its hosted on a site that isn't publicly accessible so not too worried, just didn't want to external link flagging up. But as you say if we are accessing from a URL currently it makes no difference.

The begining of the URL is there, the username field which follows is missing (present in the first GET line of code) plus a bunch of other random words. Then it populates the reg as required, enters the password afterwords as instructed. But the username field is missing. Just trying to juggle it about to make it work, very confident it will.
Jambo
Member

Registered: 8th Sep 01
Location: Maidenhead, Drives: VXR Arctic
User status: Offline
2nd Apr 14 at 13:43   View User's Profile U2U Member Reply With Quote

Ah that makes a tad more sense, I am a n00b. didnt realise you broke it down via the ampersands. Trying v3.0...
Jambo
Member

Registered: 8th Sep 01
Location: Maidenhead, Drives: VXR Arctic
User status: Offline
2nd Apr 14 at 14:58   View User's Profile U2U Member Reply With Quote

I am struggling with this but enjoying this immensely. Thanks Ian,

99.9% there, struggling with a minor discrepancy! Kiss imminent

[Edited on 02-04-2014 by Jambo]
Jambo
Member

Registered: 8th Sep 01
Location: Maidenhead, Drives: VXR Arctic
User status: Offline
2nd Apr 14 at 16:14   View User's Profile U2U Member Reply With Quote

IT WORKS YOU BEAUTY
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
2nd Apr 14 at 22:30   View Garage View User's Profile U2U Member Reply With Quote

JordyCarter
Member

Registered: 14th Mar 10
User status: Offline
9th Apr 14 at 16:01   View User's Profile U2U Member Reply With Quote

wtf ians some sort of java guru?

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
red x's gavin18787 Geek Day 1 560
3rd Aug 06 at 21:48
by _Allan_
 
cant upload photos IvIarkgraham Help Zone, Modification and ICE Advice 9 581
29th Aug 06 at 20:51
by IvIarkgraham
 
Solution needed topshot_2k Geek Day 14 677
30th Mar 07 at 21:37
by Steve
 
java/html help daymoon Geek Day 6 560
3rd Jan 10 at 14:29
by xa0s
 
PHP/HTML Geeks... Bart Geek Day 24 1095
28th Mar 12 at 15:43
by Dom
 

Corsa Sport » Message Board » Off Day » Geek Day » HTML/Java Geeks - Possible solution? 29 database queries in 0.0099158 seconds