Hi,
I have a textbox and a hyperlink on the same page. Is it possible to pass the value of the textbox control as parameter to the hyperlink?
thanks.
Printable View
Hi,
I have a textbox and a hyperlink on the same page. Is it possible to pass the value of the textbox control as parameter to the hyperlink?
thanks.
How do you mean? When the text box is changed? You could do something like this I suppose:
I think that should work.Code:<input name="textboxName" value="Blah..."
onchange="document.links['linkId'].href = 'page.php?value='+this.value;" />
<a href="page.php" id="linkId">Link</a>
I'd like to pass the value of the textbox as parameter to the hyperlink. So when the user input a value in the textbox, say "Marivic" then when the user clicks on the hyperlink, it should have "Marivic" as parameter, something like:
href="myasp.asp?name=textbox1.value"
where textbox1.value="Marivic"
Thanks.
I'd like to pass the value of the textbox as parameter to the hyperlink. So when the user input a value in the textbox, say "Marivic" then when the user clicks on the hyperlink, it should have "Marivic" as parameter, something like:
href="myasp.asp?name=textbox1.value"
where textbox1.value="Marivic"
Thanks.
Something like that?Code:<a href="#" onclick="window.location='http://www.somesite.com/page.php?value='+textbox1.value;">Click Me</a>
The code I gave you in the first place should have done what you wanted :confused:
Yup..that did it!
Thanks for helping guys.