This is a discussion on "Two submit buttons" within the Web Page Design section. This forum, and the thread "Two submit buttons are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Two submit buttons
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|
|
|||
|
you could try using onclick on each of the submit buttons, when they are clicked change the action of your form using javascript to addpost.php or preivew.php.
Make sense? |
|
|||
|
There's no need - you can actually detect which was pressed in PHP!
If you name your submit button 'submit' then that variable can be accessed by:
This solution is server side (clearly) and is therefore more reliable than a Javascript solution. |
|
|||
|
You can do it with ASP as well, just by requesting it from the form.
|
|
|||
|
Sorry, my example wasn't very good - I'm assuming you know how to use !isset
|
![]() |
| Tags |
| two, submit, buttons |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| submit many forms - auto submit the same form many times | divs | JavaScript Forum | 0 | May 24th, 2007 10:10 |
| How do i submit a form with radio buttons ? | Accurax | Web Page Design | 5 | May 12th, 2007 18:34 |
| Submit Buttons | cewgirl | Starting Out | 14 | Apr 3rd, 2007 01:28 |
| Validation problem with multiple submit buttons | celia05es | JavaScript Forum | 2 | Sep 29th, 2005 08:19 |
| Styling submit buttons using CSS | wheatus | Web Page Design | 3 | Jul 24th, 2004 07:32 |