By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,607 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,607 IT Pros & Developers. It's quick & easy.

javascript not responding

P: n/a
Hi,

I got a little problem with executing a javascript. I have a simple html
page with a textfield and a button. When I hit the button a javascript will
check the value of the textfield. If it's a right value, a new page will be
opened otherwise I get an error message.

That works but now I want to execute the script also if I hit enter after
typing in the textbox. The webpage will be loaded but the script won't be
executed. Even stranger, if I add a second textbox to the page it suddenly
works?! That's fine but I want to get rid off that second box, it has to
work with one.

Greetings,
Rick
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Use the forms onSubmit property to run the function that does the
validation.

Stu

"Rick" <as******@hotmail.com> wrote in message
news:3f***********************@news.xs4all.nl...
Hi,

I got a little problem with executing a javascript. I have a simple html
page with a textfield and a button. When I hit the button a javascript will check the value of the textfield. If it's a right value, a new page will be opened otherwise I get an error message.

That works but now I want to execute the script also if I hit enter after
typing in the textbox. The webpage will be loaded but the script won't be
executed. Even stranger, if I add a second textbox to the page it suddenly
works?! That's fine but I want to get rid off that second box, it has to
work with one.

Greetings,
Rick

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.