T
Tyrone Slothrop
I have created a form which has two submit buttons. The first is a
preview button to view the data they have entered into a formated
page. The second actually submits the data for saving. The two
submit buttons have onclick events defined for both the targets and
actions. These are both working OK.
However, I have an onsubmit event in the form tag which validates the
data which is also triggered when the preview button is clicked. I
want to block this behavior.
Is there a way to determine which button is clicked in the validation
function, or bypass it altogether? Perhaps there is a better way to
trigger the validation than onsubmit?
TIA!
preview button to view the data they have entered into a formated
page. The second actually submits the data for saving. The two
submit buttons have onclick events defined for both the targets and
actions. These are both working OK.
However, I have an onsubmit event in the form tag which validates the
data which is also triggered when the preview button is clicked. I
want to block this behavior.
Is there a way to determine which button is clicked in the validation
function, or bypass it altogether? Perhaps there is a better way to
trigger the validation than onsubmit?
TIA!