Can't set imagebutton to default button

G

Guest

Hello all,

I have a standard-issue textbox to enter search words and an imagebutton to
execute the search. When they press enter in the textbox I want it to click
the button and run the server-side handler.

Based on code I've seen out here and other articles, I can do this if the
button is <input type=button>, by trapping the enter key in script and
calling myButton.onclick from the textbox.

But, I can't get this to work if the button is <input type=image>. I think
it has to do with default submit behavior, but I'm not seeing it. I'm
thinking too I might need to explicitly set the __eventtarget before the
submit, but that isn't working either. Any thoughts?

Thanks,

Bill
 

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,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top