Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

JavaScript check submit problem under IE.

Avatar of drcyrus3d
drcyrus3d asked on
JavaScript
2 Comments1 Solution434 ViewsLast Modified:
Hi!

I have this form on one of my pages:

<form name="form8" method="post" action="">
      <input name="start_search" type="text" id="start_search" onKeyDown="checkSubmit()">
      <input type="submit" name="Submit5" value="Search">
</form>

This is the checkSubmit() function:

<script language="javascript">
function checkSubmit() {
   if(!window.event) { return; }
   if(window.event.keyCode == 13) {
                     document.forms['form8'].submit();
            }
   }
   //alert(window.event);
</script>

When somebody wants to enter a string and hit enter while the focus is still on the textbox i have to submit the form. If the form is submited some query's are executed.

Ok. In Firefox i have no problem with this script, but in Internet Explorer it gives me an error "null" and thats all. Does nothing else.

Where is the problem?

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of LeeKowalkowski
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers