sigal
06-22-2004, 01:20 PM
Hello,
A very easy question I hope.
I get in Netscape javascript console the title error and "object expected" in IE error message, these on the same page, for the following code:
"
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Thanks</TITLE>
<!--
<SCRIPT type="text/javascript">
function RedirectMe(id)
{
if (window.navigator.appName == "Microsoft Internet Explorer")
{
alert("in RedirectMe()");
alert(id);
window.location.href = ID
}
else
{
window.alert("in RedirectMe()");
window.alert(id);
alert("window.navigator.appName = " & window.navigator.appName);
window.close();
window.open(id);
}
}
function test()
{
alert("test");
}
function myfunction(txt)
{
alert(txt)
}
</SCRIPT>
-->
</HEAD>
<BODY>
....
<table><tr><center>
<!--<td><a id = 'http://cerospig.ocean.org.il/' href = # style = 'color:blue;' onclick = "window.alert(this.id); javascript:RedirectMe('this.id');">Cerospig Home Page</a></td>-->
<!--<td><a id = 'http://cerospig.ocean.org.il/' href = "javascript:test();" style = 'color:blue;'>Cerospig Home Page</a></td>-->
<td><a id = 'http://cerospig.ocean.org.il/' href = # style = 'color:blue;' onclick = "test();">Cerospig Home Page</a></td>
<td></td><td></td><td></td>
<!--<td><a id = 'http://www.ifremer.fr/mama/' href = # style = 'color:blue;' onclick = "window.alert(this.id); javascript:RedirectMe('this.id');">MAMA Project</a></td>-->
<!--<td><a id = 'http://www.ifremer.fr/mama/' href = "javascript:test();" style = 'color:blue;'>MAMA Project</a></td>-->
<td><a id = 'http://www.ifremer.fr/mama/' href = # style = 'color:blue;' onclick = "test();">MAMA Project</a></td>
</center></tr></table></p>
</DIV>
</BODY>
</HTML>
"
The comments are for the deferent trials.
Basically I try to redirect each browser to the same two links.
but even test() function is not working.
I'm puzzled. What is wrong?
thanks for your attention
A very easy question I hope.
I get in Netscape javascript console the title error and "object expected" in IE error message, these on the same page, for the following code:
"
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Thanks</TITLE>
<!--
<SCRIPT type="text/javascript">
function RedirectMe(id)
{
if (window.navigator.appName == "Microsoft Internet Explorer")
{
alert("in RedirectMe()");
alert(id);
window.location.href = ID
}
else
{
window.alert("in RedirectMe()");
window.alert(id);
alert("window.navigator.appName = " & window.navigator.appName);
window.close();
window.open(id);
}
}
function test()
{
alert("test");
}
function myfunction(txt)
{
alert(txt)
}
</SCRIPT>
-->
</HEAD>
<BODY>
....
<table><tr><center>
<!--<td><a id = 'http://cerospig.ocean.org.il/' href = # style = 'color:blue;' onclick = "window.alert(this.id); javascript:RedirectMe('this.id');">Cerospig Home Page</a></td>-->
<!--<td><a id = 'http://cerospig.ocean.org.il/' href = "javascript:test();" style = 'color:blue;'>Cerospig Home Page</a></td>-->
<td><a id = 'http://cerospig.ocean.org.il/' href = # style = 'color:blue;' onclick = "test();">Cerospig Home Page</a></td>
<td></td><td></td><td></td>
<!--<td><a id = 'http://www.ifremer.fr/mama/' href = # style = 'color:blue;' onclick = "window.alert(this.id); javascript:RedirectMe('this.id');">MAMA Project</a></td>-->
<!--<td><a id = 'http://www.ifremer.fr/mama/' href = "javascript:test();" style = 'color:blue;'>MAMA Project</a></td>-->
<td><a id = 'http://www.ifremer.fr/mama/' href = # style = 'color:blue;' onclick = "test();">MAMA Project</a></td>
</center></tr></table></p>
</DIV>
</BODY>
</HTML>
"
The comments are for the deferent trials.
Basically I try to redirect each browser to the same two links.
but even test() function is not working.
I'm puzzled. What is wrong?
thanks for your attention