...

View Full Version : cannot submit only 1 inner form



himanshu.2009
03-06-2009, 07:49 AM
Working Code


<form action=outer.cgi method=post name=outer>
<tr> <td>....</td> </tr>
<!--some elements like this in outer form -->

<table border="1">
<tr>
<td> Parameter </td>
<td> Description </td>
<td> Value </td>
</tr>

<form name="inner1" method="POST" action="inner1.cgi">
<tr>
<td>Machine name</td>
<td>specify machine name</td>
<td><input type="text" name="args1" value=""></td>
</tr>
<input type="hidden" name="idx" value="8"><input type="hidden" name="new" value="1">
</form>

<!-- If "form below" is there,then only "form above" submits -->
<form name="inner1" method="POST" action="inner1.cgi">
<input type="hidden" name="idx" value="8"><input type="hidden" name="new" value="1">
</form>

</table>
<!-- outer form ends -->
</form>


Not working code


<form action=outer.cgi method=post name=outer>
<tr> <td>....</td> </tr>
<!--some elements like this in outer form -->

<table border="1">
<tr>
<td> Parameter </td>
<td> Description </td>
<td> Value </td>
</tr>

<form name="inner1" method="POST" action="inner1.cgi">
<tr>
<td>Machine Name</td>
<td>specify target machine name</td>
<td><input type="text" name="args1" value=""></td>
</tr>
<input type="hidden" name="idx" value="8"><input type="hidden" name="new" value="1">
</form>

<!-- I want this code to work. Dont want another same name form here -->

<script>
document.inner1.submit();
</script>
</table>


my XSL file is producing this HTML code depending on my XML file.
meas in prototypical view,


<form name=outer1>
<form name=form1></form>
<form name=form2></form>
<script>
document.form2.submit();
</script>
<form>
<!-- Then form2 submits.but if I remove form1 line,then form2 doesn't submit. -->
<!-- I dont want form1 there in picture..Cannot I submit form2 without any form in between 'outer1' and 'form2' is my question -->

abduraooft
03-06-2009, 08:14 AM
Validate your code (http://validator.w3.org/#validate_by_input) and fix all erros in your markup! Your nesting of tags is incorrect.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum