[jQuery] click() problem in IE6 / IE7

[jQuery] click() problem in IE6 / IE7


Hi,
I have tried the following code:
<html>
<head>
    <title>TEST</title>
    <script type="text/javascript" src="jquery-1.2.1.min.js"></script>
</head>
<script language="javascript">
function test2() {
    alert('hi');
}
function test() {
    $('#test').html('&lt;a href="#" onclick="test2();"&gt;Generierter
Link&lt;/a&gt;');
    $('#test').click();
}
</script>
<body>
<div id="test" style="background:#fc6;">&nbsp;</div>
&lt;a href="#" onclick="test();"&gt;Testen&lt;/a&gt;
</body>
</html>
An anchor tag is automatically inserted. Then the current onclick-function
("test2") should be raised. In Firefox it works fine. But in IE6 / IE7
nothing happens.
Thanks for help,
chris
--
View this message in context: http://www.nabble.com/click%28%29-problem-in-IE6---IE7-tp15999732s27240p15999732.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.