javascript : submit for via link + "retrieving value of submit button"
-
When you submit a form via javascript, (it is already done), the value of Submit button is not set. I want this to be set for security reason and as good programming practice. I tried something like this, that should work but it does not.
document.hiddenform.school.value = 'My School'; document.hiddenform.submitbutton.value = 'My Submit'; document.hiddenform.submit() ;
That is I am setting value of of submit button in javascript. While "My School" text is correctly assigned to the school text field, "My Submit" text is no assigned to submit button. Any one know what is the best way to go about it? I am using link to submit form and i want the submit button to be set as well. Well actually I might go without the submit button but just curious if anyone can help in this case, just for testing. Thanks
-
When you submit a form via javascript, (it is already done), the value of Submit button is not set. I want this to be set for security reason and as good programming practice. I tried something like this, that should work but it does not.
document.hiddenform.school.value = 'My School'; document.hiddenform.submitbutton.value = 'My Submit'; document.hiddenform.submit() ;
That is I am setting value of of submit button in javascript. While "My School" text is correctly assigned to the school text field, "My Submit" text is no assigned to submit button. Any one know what is the best way to go about it? I am using link to submit form and i want the submit button to be set as well. Well actually I might go without the submit button but just curious if anyone can help in this case, just for testing. Thanks