Kenneth Smith

Hi, all

The Hmtl code is following:

<html>
<head>
<link type="text/css" rel="stylesheet" id="csslink" href="ora.css" />
</head>
<body>
<div>
<div id="header" class="parent chrome1 quad0" style="height: 200px;">
</div>
<div>
<a href="#" onclick="changeTheme('gre.css')">green</a><br />
<a href="#" onclick="changeTheme('ora.css')">orange</a><br />
<a href="#" onclick="changeTheme('whi.css')">white</a><br />
<a href="#" onclick="changeTheme('blu.css')">blue</a><br />
</div>
</div>

<script language="javascript">
var theme = document.getElementById("csslink");

theme.href = "ora.css";

function changeTheme(t)
{
theme.href = t;
}
</script>

</body>
</html>

ora.css

#header
{
background-color: #da7429;
}

gre.css, whi,css and blu.css just with different value for background-color, you also didn't create those css file.

when you click green , orange, white and blue link , IE will prop up a error window, when you click 'ok' button then all IE6 window will be closed,

is there any body know why

Thanks

Kenneth



Re: Internet Explorer Web Development Click links cause all IE6 window closed

Kenneth Smith

Is there any idea for this





Re: Internet Explorer Web Development Click links cause all IE6 window closed

unique_username

I tried out your code in Firefox, IE7 and IE6. All worked fine, no popup, and no crashes.

Is this *exactly* the code you are using

The only thing I see of issue in this code, is this line:

theme.href = "ora.css";

is redundant, since it was effectively set already when the <link/> tag was added to the DOM.

Do you have any extensions installed that might make IE behave differently

Cheers,




Re: Internet Explorer Web Development Click links cause all IE6 window closed

Kenneth Smith

Thanks for you practices, I will the reason now, because I installed extension in IE6, so .....