ig*******@gmail.com wrote on 23 Mar 2007 08:12:59 -0700:
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