Closed Thread Icon

Topic awaiting preservation: Javascript: form validation doesn't submit (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=26227" title="Pages that link to Topic awaiting preservation: Javascript: form validation doesn&amp;#039;t submit (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Javascript: form validation doesn&#039;t submit <span class="small">(Page 1 of 1)</span>\

 
Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-12-2005 21:29

A little help here...

code:
function checkme()	{
	if (document.getElementById('dbw').value != "" && document.getElementById('dbwfoot').value == "")	{
		alert("Please enter a footage for Direct Burial Wire");
		document.getElementById('dbwfoot').focus();
		return false;
	}
// a bunch more IF statements here

         return true;
}



Then I call it like this:

code:
<form id="quote" method="post" action="thanks.htm" onsubmit="return checkme();">



The IF statements are working fine. But if everything is valid, the form doesn't submit, and doesn't give an error. I'm sure it's a syntax thing somewhere....

Ideas?

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 07-12-2005 23:32

I have no idea.
what do you get when you replace your onsubmit with alert(checkme());?

AT
Bipolar (III) Inmate

From: Gainesboro, TN, USA
Insane since: Aug 2000

posted posted 07-13-2005 00:22

Hey Pugz, I tried your code and it wouldn't submit for me either until I added "this" to the onsubmit like so

code:
onsubmit="return checkme(this);"



I don't know why, so don't ask Haha

later

Casey / AT
Personal
Song Lyrics
Family Recipes

« BackwardsOnwards »

Show Forum Drop Down Menu