Hi,
the following code has the mentioned behaviour:
<html>
<head>
<script type="text/javascript">
function newA() {
for (i=0;i<3;i++) {
var a = window.frames[0].document.creat eElement("a");
a.innerHTML = "anchor "+i;
a.setAttribute( "innerHTML" , "anchor "+i);
a.setAttribute( "href", "javascript:par ent.h_click()") ;
window.frames[0].document.body. appendChild(a);
}
}
function h_click() {
alert('ciao!');
}
</script>
</head>
<body>
<input type="button"
onclick="docume nt.body.appendC hild(document.c reateElement('i frame'))"
value="new iFrame">
<input type="button" onclick="newA() " value="new anchor">
</body>
</html>
The same stuff adapted to IE6 works.
Suggestions?
Thnx,
Christian
the following code has the mentioned behaviour:
<html>
<head>
<script type="text/javascript">
function newA() {
for (i=0;i<3;i++) {
var a = window.frames[0].document.creat eElement("a");
a.innerHTML = "anchor "+i;
a.setAttribute( "innerHTML" , "anchor "+i);
a.setAttribute( "href", "javascript:par ent.h_click()") ;
window.frames[0].document.body. appendChild(a);
}
}
function h_click() {
alert('ciao!');
}
</script>
</head>
<body>
<input type="button"
onclick="docume nt.body.appendC hild(document.c reateElement('i frame'))"
value="new iFrame">
<input type="button" onclick="newA() " value="new anchor">
</body>
</html>
The same stuff adapted to IE6 works.
Suggestions?
Thnx,
Christian
Comment