Hello PerlMonks. I have a HTML file that has a form with different text input blocks (Add/Search/Delete)each with different submit buttons.
There is a CGI script which takes all text box parameters from the HTML file. However, for each submit button, with "onclick" I want to pass a value(0,1,2 etc) to it so that I can have a switch case 1-Add, 2-Search etc in the CGI script for relevant Add/Search/Delete subroutines.
var mysample = '';
and posted this in the html for two submit buttons:
<input type="submit" value="Add Entry" onclick="setval(1)" />
<input type="submit" value="search" onclick="setval(2)" />
Also, I added a hidden input to pass the parameter to CGI :
<td align="left"><input type="hidden" name="mysample" size="15" maxlen
However, on running the html file, it is not passing the mysample variable value to the CGI. Any ideas?