Board Logo

drop down menu items not triggering div onClick event in IE6, IE8
achan - 2/17/2010 at 11:54 PM

I have an onclick event handler assigned to a div which surrounds the menu. The onClick event is fired on Firefox and Chrome, but not in IE (at least 6 and 8).

<html>
<head>
<title>Tigra Menu GOLD</title>
<script language="JavaScript" src="menu_files/menu.js"></script>
<script language="JavaScript" src="menu_files/items.js"></script>
<script language="JavaScript" src="menu_files/template.js"></script>
<link rel="stylesheet" href="menu_files/menu.css">

</head>
<script language="JavaScript">
function onClickAlert()
{
alert("mymenu onClickAlert");
return true;
}
</script>

<body>

<div id="mymenu" onclick="javascript:onClickAlert()">
<script language="JavaScript">

new menu (MENU_ITEMS0, MENU_POS0, {'forms' : ["fdiv"], 'zIndex' : 20});

</script>
</div>

<div id="fdiv" name="fdiv">
<fieldset style="padding-top:5px;padding-left:5px;padding-right:5px">
<legend> A form </legend>
<form name=form1 style="padding:3;margin:0">
<input name=text1 value="Textbox" size="9"> &nbsp; Check <input type="checkbox" name="c1" value="ON"><br>
<select name=select1>
<option>This is a selectbox
<option>item 0
<option>item 1
<option>item 2
<option>item 3
<option>item 4
<option>item 5
<option>item 6
<option>item 7
</select>
<br>
<input type=radio name="R1">
<input type=radio name="R1">
<input type=radio name="R1">
<input type=radio name="R1">
<input type=radio name="R1">
<input type=radio checked name=R1>
<br>
<textarea rows="3" name="S1" cols="24">TextArea</textarea><br><br>
<input type="button" value="button">
</form>
</fieldset>
</div>
</body>
</html>


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/