Click to See Complete Forum and Search --> : Multiple Submit
arnabghosh2005
05-09-2005, 09:13 AM
Hi,
How many submit buttons can be used ina single page containing only one form.If there is a way to use multiple submit buttons how to send the information through POST method.
buntine
05-09-2005, 09:55 AM
I do not think there is a limit. Each submit button will work in the same way as for as I know.
arnabghosh2005
05-10-2005, 01:13 AM
But sinceIam using only one Post method and it refers to only one asp page how can I post data with the other Submit buttons
buntine
05-10-2005, 01:31 AM
Mayby I have misunderstood you. Each submit button will work in the same way as the others. They all post the same information using the POST (or GET) method, unless you break the page up into several forms (<form>).
Are you having a specific problem? Have you got some code that demonstrates your dilemma?
Regards.
arnabghosh2005
05-10-2005, 01:43 AM
Hi,
The following is the code I am using:
<form name=form1 method="post" action="update_records.asp">
<input type="submit" name="add" value="Add Records">
<input type="submit" name="update" value="Modify Records">
<input type="submit" name="delete" value="Delete Records">
</form>
-------------------------------------------------------------------------
Here the action page update_records.asp is the page that is doing the updation of records, but for adding records & deleting records I am using 2 different pages add_record.asp & del_record.asp
Now if I use all the 3 Submit buttons how can I post data to the respective pages
Regards
buntine
05-10-2005, 03:08 AM
The easiest way would be to use three seperate forms. Otherwise, you will need to resort to using JavaScript to send the correct data to the server.
arnabghosh2005
05-10-2005, 03:11 AM
Thanks,
This is probably the easiest and most comfortable option so far.