A
AndreHaupt
Hi,
Maybe I'm just being thick, but when my Javascript is inside the xhtml
itself it works fine:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script type="text/javascript"> window.onload = function()
{ alert("hello"); }</script>
</head>
.....
</html>
But when I move it to an external js file, it is not executed in IE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script src="/javascript/common.js" type="text/javascript"></
script>
</head>
....
</html>
common.js:
window.onload = function() { alert("hello"); }
It works in Mozilla though....
Any ideas?
Maybe I'm just being thick, but when my Javascript is inside the xhtml
itself it works fine:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script type="text/javascript"> window.onload = function()
{ alert("hello"); }</script>
</head>
.....
</html>
But when I move it to an external js file, it is not executed in IE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script src="/javascript/common.js" type="text/javascript"></
script>
</head>
....
</html>
common.js:
window.onload = function() { alert("hello"); }
It works in Mozilla though....
Any ideas?