Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-17-2009, 10:56 PM   PM User | #1
pbase
New to the CF scene

 
Join Date: Jan 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
pbase is an unknown quantity at this point
Bit of code needed to pass a variable to a URL.

Hi All,

I'm trying to hack my wordpress home page to enable users to enter in a package tracking number and pass it to boxoh.com, an online package tracker.

All I need is a bit of code to pass the number to the URL in the following format:

http://boxoh.com/?t=85642012466&rss=1

where "85642012466" is the number the user enters in.

Any help would be greatly appreciated.

Last edited by pbase; 01-17-2009 at 11:19 PM..
pbase is offline   Reply With Quote
Old 01-17-2009, 11:38 PM   PM User | #2
itsallkizza
Senior Coder

 
Join Date: Oct 2008
Location: Long Beach
Posts: 1,196
Thanks: 36
Thanked 164 Times in 164 Posts
itsallkizza will become famous soon enough
A simple form, method="get", will do that for you:
Code:
<form action="http://boxoh.com/" method="get">
	<input type="hidden" name="rss" value="1" />
	<input type="text" name="t" /><br />
	<input type="submit" value="submit" />
</form>
No Javascript is needed unless you want to validate.
__________________
Feel free to e-mail me if I forget to respond ;)
ohsosexybrit@gmail.com
itsallkizza is offline   Reply With Quote
Users who have thanked itsallkizza for this post:
pbase (01-18-2009)
Old 01-17-2009, 11:51 PM   PM User | #3
pbase
New to the CF scene

 
Join Date: Jan 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
pbase is an unknown quantity at this point
and this will result in a URL formatted thusly?

http://boxoh.com/?t=85642012466&rss=1
pbase is offline   Reply With Quote
Old 01-18-2009, 06:53 AM   PM User | #4
pbase
New to the CF scene

 
Join Date: Jan 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
pbase is an unknown quantity at this point
That worked. Much thanks, itsallkizza.
pbase is offline   Reply With Quote
Reply

Bookmarks

Tags
hack, package tracking, url, variable, wordpress

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:15 AM.


Advertisement
Log in to turn off these ads.