|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all.. happy new year.
I'm new in asp. i have a problem with using 2 submit buttons in a form, i renamed the buttons and used some coding on it. i got an error message..."Error on Page" wat does that means? how do i use 2 submit buttons in a form? thanks in advance! @)~~ |
|
#2
|
|||
|
|||
|
here's one method:
http://www.loudasp.com/knowledgebas...id=33&faqid=884 but if you can give me a little more info in terms of what you are trying to accomplish, I can probably give you some more advice. |
|
#3
|
|||
|
|||
|
Thank you so much! thanks thanks
it works just fine...... :-) thanks alot catz tay |
|
#4
|
|||
|
|||
|
glad it worked. Another option, which is a bit more complex is to define your buttons as follows:
Add button <input type="submit" name="action" value="Add"> Delete button <input type="submit" name="action" value="Delete"> and then have the page post back to itself and do a cmdaction = Request.Form("action") if cmdaction = "Add" then 'add the record to the database elseif cmdaction = "Delete" then 'delete the record from the database etc, etc. If cmdaction = "" then ' display the form |
|
#5
|
|||
|
|||
|
an easier way is to have one submit button and one normal button, then you set up the defaults for the submit button, then using javascript, you can submit the form with the normal button, for example
<form action="delete.asp" name="test" method="post"> <input type="submit" value="Delete"> <input type="button" value="Modify" onClick="document.test.action='modify.asp'; document.test.submit();"> </form> so when you click submit it will change the action to modify.asp and submit the form |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > new to asp. multiple buttons in form q?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|