PDA

View Full Version : Simple HTML page - Query URL



mh348
28-03-2007, 10:15 AM
How do I create a simple HTML page that can query a tracking no(eg. SpeedServices).

The Page just needs to have a text Box and a Submit button. The input of the Text Box needs to be added to the end of the url.

The URL is: http://sms.postoffice.co.za/track/Parcel.aspx?ParcelID=

Once I get this right I want to add a text box for the SAPO track&trace but the website is offline so I can't get the url.

--
I'm still a noob with this kind of stuff.

icyrus
28-03-2007, 10:53 AM
This is just a snippet so you will need your own headers, etc...


<form action="http://sms.postoffice.co.za/track/Parcel.aspx" method="get">
<input type="text" name="ParcelID" />
<input type="submit" name="sbmt" />
</form>

I am not thinking clearly at the moment so that could well be wrong but I hope it will work.

HTH

Roo!
28-03-2007, 11:27 AM
Looks good, just copy the snippet and change the form action and text input name to match the other site you want (you'll end up with 2 forms on one page).

BobbyMac
28-03-2007, 11:53 AM
Correct. Setting action to GET will automatically append all the form fields as constants into the URL query string. That includes hidden fields and submit buttons. If this is not desired, you may want to use JavaScript to achieve the desired outcome.

mh348
28-03-2007, 12:12 PM
I am not thinking clearly at the moment so that could well be wrong but I hope it will work.

HTH

Thanks, it works great

mh348
28-03-2007, 01:09 PM
I played around with the code above, then I took the google custom search page and changed the links. There's still extra code for the colour thats not required but I left it there.

Here's the page
http://www.ahms.za.net/trk2.htm

I still haven't tested the SAPO search as their website is still offline, I found a SAPO search link in my email account.

mh348
28-03-2007, 05:50 PM
I check the SAPO search box and there was an error but thats corrected,

Thanks for the help

http://www.ahms.za.net/trk2.htm

mh348
02-04-2007, 10:54 PM
If I want the results of the query to be displayed on my page (in the same window), how do I go about doing it.

bwana
02-04-2007, 11:11 PM
If I want the results of the query to be displayed on my page (in the same window), how do I go about doing it.Change the target from _blank to _self.

mh348
02-04-2007, 11:19 PM
Change the target from _blank to _self.

Thanks, if i want the results to be on my own page, the url displayed ontop should be mine not the post office, is that possible?

icyrus
03-04-2007, 09:36 AM
Thanks, if i want the results to be on my own page, the url displayed ontop should be mine not the post office, is that possible?

Only using frames. Unless you want to get into server-side scripting and html page parsing.

mh348
03-04-2007, 09:42 AM
Only using frames. Unless you want to get into server-side scripting and html page parsing.

Is that very complicated, do you know of an online guide that I can use?

bwana
03-04-2007, 09:48 AM
Is that very complicated, do you know of an online guide that I can use?Are you hand coding or using software?

EDIT - btw that question is only relevant if you're going the frames route. :)

mh348
03-04-2007, 09:56 AM
I did the page above using notepad, but I do have Nvu installed. What software do you reccomend.

BobbyMac
03-04-2007, 10:41 AM
You don't need any software and you don't need to build any special frames either. Rather use an iFrame - it's pretty well supported these days.

http://en.wikipedia.org/wiki/IFrame and http://www.webmonkey.com/webmonkey/96/37/index2a.html and http://www.samisite.com/test-csb2nf/id43.htm

mh348
23-04-2008, 01:15 PM
I had the Page converted to php by a friend, here's the new link:

http://www.mhcomputers.co.za/parcel.php