Force Form Submission

I am trying to have the code auto submit after the focus leaves a textbox.  In the example I have below, I am trying to have it submit itself using the onblur property, but it gives me a "Object doesn't support this property or method" error.  Any help would be great.


<form method="post" name="idform" action = "<?php print $_SERVER["PHP_SELF"] ?>">

Username:<input type="text" name="uname"><br>
Password:<input type="password" name="pword"  onblur="Javascript:document.forms[0].submit()"><br>

<input type="reset">
<input type="submit" name="submit" value="Login">

Who is Participating?
change the submit button name

<input type="submit" name="submit" value="Login">

submit will cause errors every time

<input type="submit" name="btnSubmit" value="Login">

and also you do not need the javascript in ther
Password:<input type="password" name="pword"  onblur="document.forms[0].submit()"><br>
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.