It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Onsubmit help

Onsubmit help

Postby agriz on Mon Mar 02, 2009 8:58 am

Hi,

I have two forms.

<form name="one" id="one" method="post">
<input name="" type="submit">
</form>

<form name="Mone" onsubmit="return fun()">
<input name="" type="submit">
</form>

When i click submit the second form ---> it should submit the first one.

function fun(){
document.forms[0].submit();
document.forms[0].onsubmit = function()
{
alert('sdfdsfs');
return false;
}
return false;
}

But i don't know what is wrong here. I am not getting the alert...

Can anyone help me with this..?

Any help is really appreciated.

Thanks
agriz
 
Posts: 1
Joined: Mon Mar 02, 2009 8:57 am

Re: Onsubmit help

Postby rangana on Wed Mar 04, 2009 6:08 am

Code: Select all
function fun(){
   alert('sdfdsfs');
   document.forms[0].submit();
}
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: No registered users and 4 guests