By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,932 Members | 1,468 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,932 IT Pros & Developers. It's quick & easy.

Form Tag in HTML

P: 1
Can we have one form within another form.....Just tell me whether the following code is possible....I tried doing it but failed...plz provide a solution.....
<body>
<form action="mypage.jsp">
<table border="1">
<tr>
<td>Enter Book Name :</td>
<form action="searchBook.jsp">
<td><input type="text" name="searchBookID"></td>
<td><input type="Submit" name="Submit" value="Search"></td>
</form>
</tr>
</table>
<table border="1">
<tr>
<td>Book Name :</td>
<td><input type="text" name="BookID"></td>
<td>Publisher Name :</td>
<td><input type="text" name="publisher"></td>
<td><input type="Submit" name="Submit" value="Update"></td>
</tr>
</table>
</form>
</body>
Nov 7 '06 #1
Share this Question
Share on Google+
5 Replies


kestrel
Expert 100+
P: 1,071
ive never tried a form inside another form.
but i dont think it would work out too well
Nov 7 '06 #2

P: 25
Nope..
You will have problems with the submit buttons.. they will submit the values to your fisrt <form>..
Try closing the first form and then open the second..

<form action="What to you want">
<input type="submit">
</form>

<form action="second url">
<input type="submit">
</form>
Nov 7 '06 #3

P: 25
<body>
<form action="searchBook.jsp">
<table border="1">
<tr>
<td>Enter Book Name :</td>
<td><input type="text" name="searchBookID"></td>
<td><input type="Submit" name="Submit" value="Search"></td>
</tr>
</table>
</form>
<form action="mypage.jsp">
<table border="1">
<tr>
<td>Book Name :</td>
<td><input type="text" name="BookID"></td>
<td>Publisher Name :</td>
<td><input type="text" name="publisher"></td>
<td><input type="Submit" name="Submit" value="Update"></td>
</tr>
</table>
</form>
</body>
Nov 7 '06 #4

kestrel
Expert 100+
P: 1,071
yeah, thats good...
you dont need a form inside another, doesnt accomplish anything but confusion
Nov 8 '06 #5

P: 2
can u he;p me in my problem. plz its urgent for me.
Nov 9 '06 #6

Post your reply

Sign in to post your reply or Sign up for a free account.