Wednesday, 21 August 2013

Can I have two form's in diffrent places which triggers one request to server?

Can I have two form's in diffrent places which triggers one request to
server?

I am beginner to HTML. I found there is something like form which is used
to pass data to server. I know what is the basic usage.
Last time I cut children of my initial form between two HTML files (some
reorganization to include later in JSP). Personally I don't like to start
tag <form> in one file, and close the </form> in other file. And I know I
could do something like this (I will use this probably):
<form>
// include file1
// include file2
</form>
But now I am just thinking... Is it possible to do something totally
different? like this:
// first file
<form name="input" action="index.html" method="get">
User: <input type="text" name="user">
</form>
// second file
<form name="input">
Data: <input type="text" name="data">
<input type="submit" value="Submit">
</form>
I want to submit both inputs with button inside second form. I know above
doesn't work even if I set the same name attribute. But maybe I missed
something?

No comments:

Post a Comment