niftyhawk
asked on
Nested Form Tags and Javascript
Hi,
It appears nested forms do not work.. I have the following piece of code, which I had to simplify inorder to present my case.
<form name="aform" method="post" action="newfile.php">
<input type="text" name="abc" value="somevalue">
<input type="button" value="button" onclick="document.aform.su bmit();">
<form name="bform" method="post" action="somefile.php">
<input type="text" name="def" value="testvalue">
<input type="button" value="button" onclick="document.bform.su bmit();">
</form>
</form>
Can any body tell me why bform is not recognized by javascript and if there are any alterantives possible.. inorder to make this work..
Thanks
It appears nested forms do not work.. I have the following piece of code, which I had to simplify inorder to present my case.
<form name="aform" method="post" action="newfile.php">
<input type="text" name="abc" value="somevalue">
<input type="button" value="button" onclick="document.aform.su
<form name="bform" method="post" action="somefile.php">
<input type="text" name="def" value="testvalue">
<input type="button" value="button" onclick="document.bform.su
</form>
</form>
Can any body tell me why bform is not recognized by javascript and if there are any alterantives possible.. inorder to make this work..
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So it's just a structure thing? I'm afraid the only way you can get any structure is to maybe surround your form elements with an IDed <div> or make your name your forms a certain way.
Ted
Ted
ASKER
hmm..all my inner forms have a differentname and action..however, they have to be surrounded by an outer form, otherwise how would I know what variables have been passed during the form post?
I'm not too sure what you mean... What are you trying to do exactly, and what do you expect the structure of your $_POST array to be?
Ted
Ted
ASKER