S
Shiva
This is my HTML Page containing javascript
---------------------------------------------------
<html>
<head>
<script language="JavaScript">
var isSafari = (agent.indexOf("Safari") != -1); // LINE 1
var myimg = new Object(); // LINE 2
function myfn() { alert("Hello"); }
function writemyfn() {
//myimg = new Object(); // LINE 3
document.write('<a href="javascript:myfn()"');
if (document.images) {
myimg.hi = new Image();
myimg.hi.src = "some.gif";
document.write('onmouseover="document.images.open.src=myimg.hi.src">');
}
document.write('<img name="open" src="some.gif"></a>');
}
</script>
</head>
<body>
<script language=JavaScript>
writemyfn();
</script>
</body>
</html>
---------------------------------------------------
With the above HTML, the image doesn't show on Safari
(running Safari 1.3 (v312) on Mac Mini)
If I remove LINE 1, the image starts displaying correctly.
However, I cannot do that in my actual HTML page.
Other workarounds, are if I change
LINE 2 to "var myimg = null;"
& uncomment LINE3 - then again the image starts
displaying.
Is this a known Bug in Safari? Where can it be reported?
---------------------------------------------------
<html>
<head>
<script language="JavaScript">
var isSafari = (agent.indexOf("Safari") != -1); // LINE 1
var myimg = new Object(); // LINE 2
function myfn() { alert("Hello"); }
function writemyfn() {
//myimg = new Object(); // LINE 3
document.write('<a href="javascript:myfn()"');
if (document.images) {
myimg.hi = new Image();
myimg.hi.src = "some.gif";
document.write('onmouseover="document.images.open.src=myimg.hi.src">');
}
document.write('<img name="open" src="some.gif"></a>');
}
</script>
</head>
<body>
<script language=JavaScript>
writemyfn();
</script>
</body>
</html>
---------------------------------------------------
With the above HTML, the image doesn't show on Safari
(running Safari 1.3 (v312) on Mac Mini)
If I remove LINE 1, the image starts displaying correctly.
However, I cannot do that in my actual HTML page.
Other workarounds, are if I change
LINE 2 to "var myimg = null;"
& uncomment LINE3 - then again the image starts
displaying.
Is this a known Bug in Safari? Where can it be reported?