Solved

Force Form Submission

Posted on 2004-04-13
1
1,223 Views
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.

<HTML>
<HEAD><TITLE>Test</TITLE></HEAD>

<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">

</form>            
</HTML>
0
Comment
Question by:fcpmis
1 Comment
 
LVL 16

Accepted Solution

by:
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>
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now