Hello all,
I'm sure this question has been asked before... but I'll take a swat and pray for forgiveness...
here goes:
i understand that IE does not support onclick events in the option tag. i also understand that the typical workaround for this problem is to use the select tag instead. unfortunately, using the select tag for the onclick event is not possible in my situation. i've included some pseudocode below to illustrate the problem. anybody have a solution??? thanks in advance (and afterwards too!)
<form name="form#1">
<select>
<%
open jdbc connection to mssql
open record set
while rs.next
thisRecord = getParameter...
%>
<option onclick="updateThisRecord(thisRecord);">...this will never work...</option>
<%
closing stuff
%>
</select>
</form>
<form name="form#2">
<input name="updateMe" type="hidden" value="">
<input type="button" onclick="form.submit()">
</form>
<script>
function updateThisRecord(thisRecord) {
form#2.updateMe.value==thisRecord
}
</script>
explanation: ideally the user will select the option, send "thisRecord" to the "updateThisRecord" function which will in turn update the value of the hidden element in form#2. the button in form#2 submits the form (action="#") and the value is read via getParameter for the next go-around.
i really hope that makes some sense...
thanks!
mark
I'm sure this question has been asked before... but I'll take a swat and pray for forgiveness...
here goes:
i understand that IE does not support onclick events in the option tag. i also understand that the typical workaround for this problem is to use the select tag instead. unfortunately, using the select tag for the onclick event is not possible in my situation. i've included some pseudocode below to illustrate the problem. anybody have a solution??? thanks in advance (and afterwards too!)
<form name="form#1">
<select>
<%
open jdbc connection to mssql
open record set
while rs.next
thisRecord = getParameter...
%>
<option onclick="updateThisRecord(thisRecord);">...this will never work...</option>
<%
closing stuff
%>
</select>
</form>
<form name="form#2">
<input name="updateMe" type="hidden" value="">
<input type="button" onclick="form.submit()">
</form>
<script>
function updateThisRecord(thisRecord) {
form#2.updateMe.value==thisRecord
}
</script>
explanation: ideally the user will select the option, send "thisRecord" to the "updateThisRecord" function which will in turn update the value of the hidden element in form#2. the button in form#2 submits the form (action="#") and the value is read via getParameter for the next go-around.
i really hope that makes some sense...
thanks!
mark