Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Force Form Submission

Posted on 2004-04-13
Medium Priority
Last Modified: 2006-11-17
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">

Question by:fcpmis
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 16

Accepted Solution

jaysolomon earned 200 total points
ID: 10817519
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>

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question