Closed Thread Icon

Topic awaiting preservation: Javascript: form validation doesn't submit (Page 1 of 1) Pages that link to <a href="" 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>\

Paranoid (IV) Inmate

Insane since: Apr 2000

posted posted 07-12-2005 21:29

A little help here...

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

         return true;

Then I call it like this:

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


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());?

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

onsubmit="return checkme(this);"

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


Casey / AT
Song Lyrics
Family Recipes

« BackwardsOnwards »

Show Forum Drop Down Menu