The form with the following elements is indicated.
<input name='button' value='Submit' type='submit'/>
<input name='button' value='Cancel' type='submit'/>
I want to submit a form using javascript with a completely new value.
this.form['button'] = 'MYVALUE';
this.form.submit();
How do I submit a form with a completely new button parameter value? If I click the button, the form values contain either button=SubmitOR button=Cancel, I want to send using button='MYVALUE'.
How to achieve this.
source
share