Simple HTML page - Query URL

mh348

Expert Member
Joined
Jun 2, 2006
Messages
4,229
Reaction score
41
Location
NW, SA
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.
 
This is just a snippet so you will need your own headers, etc...

PHP:
<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
 
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).
 
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.
 
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.
 
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.
 
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.
 
Last edited:
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?
 
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.
 
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. :)
 
Last edited:
I did the page above using notepad, but I do have Nvu installed. What software do you reccomend.
 
Top
Sign up to the MyBroadband newsletter
X