Hi,
I have a html form and I don't want to send it anywhere but to my javascript function. If i put the form's button to onclick, how do I access the form's values to insert as parameters in my javascript function.
For instance:
<form name="tips">
<table width="750" border="0">
<select name="display">
<option>Select A Display Mode</option>
<option value="tipsheetprint.xsl"> Print</option>
<option value="tipsheetpda.xsl">PDA</option>
<option value="tipsheet2.xsl">Screen</option>
</select>
<select name="type">
<option>Select A Display Mode</option>
<option value="tipsheetprint1.xsl"> Print1</option>
<option value="tipsheetpda2.xsl">PDA2</option>
<option value="tipsheet3.xsl">Screen3</option>
</select>
</table>
<input name="submit" value="submit"
onclick="showIt(display, type)">
</form>
In above for showIt parameters I want 'display' to be the selected option the user has chosen.(what is correct syntax?)
function showIt(display,type)//accepts str values
{
blah
}
Thanks,
Candyb
I have a html form and I don't want to send it anywhere but to my javascript function. If i put the form's button to onclick, how do I access the form's values to insert as parameters in my javascript function.
For instance:
<form name="tips">
<table width="750" border="0">
<select name="display">
<option>Select A Display Mode</option>
<option value="tipsheetprint.xsl"> Print</option>
<option value="tipsheetpda.xsl">PDA</option>
<option value="tipsheet2.xsl">Screen</option>
</select>
<select name="type">
<option>Select A Display Mode</option>
<option value="tipsheetprint1.xsl"> Print1</option>
<option value="tipsheetpda2.xsl">PDA2</option>
<option value="tipsheet3.xsl">Screen3</option>
</select>
</table>
<input name="submit" value="submit"
onclick="showIt(display, type)">
</form>
In above for showIt parameters I want 'display' to be the selected option the user has chosen.(what is correct syntax?)
function showIt(display,type)//accepts str values
{
blah
}
Thanks,
Candyb