|
-
Mar 17th, 2003, 04:50 AM
#1
Thread Starter
Addicted Member
passing values to a hyperlink
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.
-
Mar 17th, 2003, 05:45 AM
#2
Frenzied Member
How do you mean? When the text box is changed? You could do something like this I suppose:
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 think that should work.
-
Mar 17th, 2003, 08:19 PM
#3
Thread Starter
Addicted Member
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.
-
Mar 17th, 2003, 08:25 PM
#4
Thread Starter
Addicted Member
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.
-
Mar 18th, 2003, 02:29 AM
#5
Conquistador
Code:
<a href="#" onclick="window.location='http://www.somesite.com/page.php?value='+textbox1.value;">Click Me</a>
Something like that?
-
Mar 18th, 2003, 06:55 AM
#6
Frenzied Member
The code I gave you in the first place should have done what you wanted
-
Mar 18th, 2003, 08:49 PM
#7
Thread Starter
Addicted Member
Resolved
Yup..that did it!
Thanks for helping guys.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|