Force Form Submission

Posted on 2004-04-13
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 50 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Anyone familiar with PhotoSwipe? 3 42
how to use string functions to get particular string 3 51
Check if field exists SPUtility 5 48
Error just appeared 3 23
In my daily work (mainly using, I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

734 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