I have the following input tags that create two buttons with the labels of "Save" and "Preview". When either button is pressed the same form is submitted and the "action" variable will have the appropriate value depending on which button was pressed.

<input type="submit" name="action" value="Save" style="width:150px;">
<input type="submit" name="action" value="Preview" style="width:150px;">
My problem is that I need to dynamically (using javascript) change the value of the action take AFTER the button is pressed.

Basically, the button label needs to stay as they are but the value of the action variable needs to be something different. (I am unable to change the script..)

Can anyone show me how this can be done? I suspect some javascript on the onClick event would do it..