onClick won't fire, chrome/safari

avta77

New Member
This fiddle is not the complete set of code. However it is the isolated code in which I am having a problem.This works in all versions of IE, and will not work in Safari/Chrome. Specifically I am trying to get this to work on an IPAD. The Select button will push, and the function will not do anything, and will essentially be stuck there... Anyone have any suggestions?http://jsfiddle.net/Eh9QC/\[code\]function selectStatements(f) { var selectedArray = new Array(); var selObj = document.getElementById('statementGroups'); var i = 1; var count = 0; for (i=0; i<selObj.options.length; i++) { if ( (selObj.options.selected) && count<20 ) { selectedArray[count] = selObj.options.value; count ++; } } f.chosenStatements.value = http://stackoverflow.com/questions/13714597/selectedArray; document.glStatementForm.glaction.value ="updateChosenList"; document.glStatementForm.action="glstsend.shtml"; document.glStatementForm.method="POST"; document.glStatementForm.submit(); } </script>???\[/code\]HTML:\[code\] #IF EXPR = (clientState == "setList") --> <div id="openBox2"> <tr> <td VALIGN="top"><B>Statements:</B> <td VALIGN="top"> <SELECT NAME="statementGroups" SIZE=10 MULTIPLE> <!-- #SET NAME = ldx VALUE = http://stackoverflow.com/questions/13714597/0 --><!-- #WHILE EXPR=(ldx < disp_list_count) --> <OPTION VALUE="(*disp_dropdown_value[ldx]*)">(*disp_dropdown_text[ldx]*) <!-- #SET NAME = ldx VALUE = http://stackoverflow.com/questions/13714597/ldx + 1 --><!-- #ENDWHILE --> </SELECT> <tr> <td> <BR /> <td> <INPUT TYPE=BUTTON VALUE="Select" STYLE="font:8pt Arial" ONCLICK="selectStatements(this.form);"> <!-- #ENDIF --> </table> </div> ?\[/code\]
 
Back
Top