Jump to content

....javascript Help, Please Look


p8baller07

Recommended Posts

I need to run multiple onSubmit functions.

Ok here are the two crapitions and this is what i've tryed so far.

 

I tried this.

 

<form name=FrontPage_form1 onsubmit="return FrontPage_form1_validator(this); return validate(this)"

 

those are the two functions

 

return FrontPage_form1_validator(this)

and

return validate(this)

 

Thanks

 

-Aimen

 

Edit: if you wanna look at the hole code look at it.

 

http://www.dalveydepot.com/test/checkout2.asp

Edited by p8baller07

Share this post


Link to post
Share on other sites

you can only return one function in the onsubmit function. so try something like this.

 

 

<script>

function Submit()

{

if(form1() && form2())

{

return true;

}

else

return false;

}

Share this post


Link to post
Share on other sites

you can only return one function in the onsubmit function. so try something like this.

 

 

<script>

function Submit()

{

if(form1() && form2())

{

return true;

}

else

return false;

}

</script>

<form onsubmit="return Submit()">

You are incorrect. I already found out how. use this

 

onSubmit="return (function1(this) && function2(this))"

Dont believe me? IM me, ill give you the page i made for work, i had to call 2 scripts one the uses the luhn formula to verify credit cards and the other makes sure no feilds are left blank when the use submits the order form

Share this post


Link to post
Share on other sites

haha oops yea i know that works i forgot about using the && in between two functions. my bad...i'm always trying to do things the hard way lol

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...