putting a variable in parameter for a URL

I

ig.martix

Is it possible to put a variable in parameter for a URL?

I'm looking to have a page with an input box and a link. When someone
puts in a value in the input box and clicks the link it will take the
value and pass it through the link to an asp page.

example:

Employee Name <input type="text" name="Tname" size="20">
<a href="emp_info.asp?e_num= Tname.value">Employee Info </a>

How can I get this to work??
 
D

Daniel Crichton

Is it possible to put a variable in parameter for a URL?

I'm looking to have a page with an input box and a link. When someone
puts in a value in the input box and clicks the link it will take the
value and pass it through the link to an asp page.

example:

Employee Name <input type="text" name="Tname" size="20">
<a href="emp_info.asp?e_num= Tname.value">Employee Info </a>

How can I get this to work??

<form action="emp_info.asp" method="GET">
<input type="text" name="e_num" size="20">
<input type="submit" value="Employee Info">
</form>

This has nothing to do with ASP, which is server side programming.

Enter the value in the box, click the Employee Info button, and you'll get
the URL you want. To use a link such as you have there you'd need some
client side scripting to take the text value and append it to the URL, but
the code is pretty trivial.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top