471,055 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,055 software developers and data experts.

onclick() to text

Ike
I have an onclick() event handler wherein I want to change a value that then
needs to be shown in a textbox on a form on the page......can anyone show me
how this is done? Thanks, Ike
Jul 23 '05 #1
1 1276
<form name="search" action="..." method="post">

<input type="text" value="search term" name="query"
onEnter="if (this.value=='search term') this.value='';">

<input type="button" value=" Blah! "
onClick="document.forms['search'].query.value='blah!';">

<input type="submit" value=" Search! ">

</form>

Hope this helps,
Vincent

Ike wrote:
I have an onclick() event handler wherein I want to change a value that then
needs to be shown in a textbox on a form on the page......can anyone show me
how this is done? Thanks, Ike


Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Vinita Sharma | last post: by
2 posts views Thread by RobG | last post: by
4 posts views Thread by sameergn | last post: by
3 posts views Thread by Michael_R_Banks | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.