djr33
03-06-2006, 05:49 AM
Ok... so... a form would generally be organized like this:
<form ...>
<input(s)>
<[submit button]>
</form>
...but what if you want to have two submit buttons? Well... sure... just copy that code. But, I want them to actually do two different things.
What i'm trying to do is basically what is happening below me as I type, having a preview button and a submit button.
You can't just have a link because that won't get the values of the form and move them to the next page.
You can't have two submit buttons because they'd do the same thing, defeating the purpose.
Btw, I realized that you could just have a checkbox and check 'preview only' and the script on the next page would then preview it for you instead of submitting... but that seems ugly from a user perspective.
Maybe the name of the second submit button could differ and that would relate to the script on the next page?
There's probly a simple answer.
Thanks.
<form ...>
<input(s)>
<[submit button]>
</form>
...but what if you want to have two submit buttons? Well... sure... just copy that code. But, I want them to actually do two different things.
What i'm trying to do is basically what is happening below me as I type, having a preview button and a submit button.
You can't just have a link because that won't get the values of the form and move them to the next page.
You can't have two submit buttons because they'd do the same thing, defeating the purpose.
Btw, I realized that you could just have a checkbox and check 'preview only' and the script on the next page would then preview it for you instead of submitting... but that seems ugly from a user perspective.
Maybe the name of the second submit button could differ and that would relate to the script on the next page?
There's probly a simple answer.
Thanks.