2015-08-16 13:06
浏览 195


This may be a silly question...

I have a table with a form which has a textarea in one row, on the row beneath is two cells, I want the 'submit' button which will send the input of this textarea on the right cell and a 'clear' button on the cell on the left which will post a different form if clicked. I know we can't have nested forms but is there a way to do this ?


Here is the code from the table:

<td colspan="5" align="left"><form name="confirm" id="confirm" action="order.php" method="post">
<span style="color:#cccccc;">Comments</span><br>
<textarea rows="3" cols="40" name="comments" id="comments"></textarea>

<tr><td align="left" colspan="2">
<input type="hidden" name="tablenumber" value="none">
<input type="hidden" name="action" id="action" value="confirm">
<input type="submit" id="submit" value="CONFIRM" form="confirm" name="submit" class="confirm_btn"></form>

<td align="right" colspan="3">
<form name="clear" id="clear" action="menu4.php?catid=confirm_order" method="post">
<input type="hidden" name="tablenumber" value="none">

    <input type="hidden" name="action" id="action" value="clear">
    <input type="submit" id="submit" value="CLEAR" form="clear" name="submit" class="clear_btn"></form>&nbsp;

Yes, the clear button will be sending data, actually is will send a request to emptt the cart and refresh the page.

1条回答 默认 最新

相关推荐 更多相似问题