Announcement

Collapse
No announcement yet.

'return false' submitting form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    'return false' submitting form

    Hi

    I have validation on my basket with a 'return false' on a conditional test yet the form is submitting. Can you see what I am doing wrong?

    My form tage has the onsubmit() tag:

    Code:
    <form method="post" onsubmit="return myFunction();">
    my js goes like this:

    Code:
    function myFunction() {
    	do some stuff;
    	if (conditional test is false) 
    		{ 
    		alert("show this message");
    		return false;		// inhibit click
    		} 
    	return true;			// allow click
    }
    example of my work http://www.tattoofashion.com

    #2
    Looks like it should work. Would need a link to a problem page to test it.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment

    Working...
    X