M
mithaelin
ok, I can't get out of this riddle and Google seems can't help me.
The problem is that this code doesn't work in iexplorer while it's
perfect in other browser (didn't check in safari):
<html>
<head>
<script src="include/js/scriptaculous/lib/prototype.js"></script>
<script src="include/js/scriptaculous/src/scriptaculous.js"></script>
<script type="application/javascript" language="javascript">
function goofy(id) {
var linkList = $(id).getElementsByTagName('a');
var tmp;
var j;
while (tmp=linkList[j++]) {
if (tmp.rel=='bar') alert ('yes');
else alert ('no');
}
}
</script>
</head>
<body id="corpse">
<a href="http://www.foo.bar" rel="bar">foo</a>
<a href="http://www.foo.bar">foo</a>
</body>
<script type="application/javascript" language="javascript">
var init=goofy('corpse');
Event.observe(window,'load',init);
</script>
</html>
Now, what's the point?
I'm sure it isn't a prototype problem so it's my fault, but where?
Do you have any hint?
Do you have some offence for my incompetence (but only in combo with
hint)?
thank you for patience
The problem is that this code doesn't work in iexplorer while it's
perfect in other browser (didn't check in safari):
<html>
<head>
<script src="include/js/scriptaculous/lib/prototype.js"></script>
<script src="include/js/scriptaculous/src/scriptaculous.js"></script>
<script type="application/javascript" language="javascript">
function goofy(id) {
var linkList = $(id).getElementsByTagName('a');
var tmp;
var j;
while (tmp=linkList[j++]) {
if (tmp.rel=='bar') alert ('yes');
else alert ('no');
}
}
</script>
</head>
<body id="corpse">
<a href="http://www.foo.bar" rel="bar">foo</a>
<a href="http://www.foo.bar">foo</a>
</body>
<script type="application/javascript" language="javascript">
var init=goofy('corpse');
Event.observe(window,'load',init);
</script>
</html>
Now, what's the point?
I'm sure it isn't a prototype problem so it's my fault, but where?
Do you have any hint?
Do you have some offence for my incompetence (but only in combo with
hint)?
thank you for patience