Hello,
Just out of interest, could someone tell me why the following code and script works fine on FF but not with IE,
and main.css is
with dark.css being
and the example here -->
IE Error: "unknown runtime error" (as helpful as ever)
as I say it's more out of interest, if anyone knows,
Cheers.
Just out of interest, could someone tell me why the following code and script works fine on FF but not with IE,
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Test Css</title>
<style type="text/css" media="all" id="mood">@import url("main.css");</style>
<style type="text/css">
.btn{
border:groove gray 2px;
background:black;
color:white;
text-align:center;
cursor:pointer;
width:100px;
}
</style>
</head>
<body>
<div id="btnmood">
<div id="default" class="btn" onclick='mood("main");'> Normal </div>
<br />
<div id="dark" class="btn" onclick="mood(this.id);"> Dark </div>
</div>
<script type="text/javascript">
function mood(m){
//alert(m);
var jj=document.getElementById('mood');
jj.innerHTML='@import url(\"' +m+ '.css\");';
}
</script>
</body>
</html>
and main.css is
Code:
body{
background:orange;
}
with dark.css being
Code:
body{
background:darkblue;
}
and the example here -->
IE Error: "unknown runtime error" (as helpful as ever)
as I say it's more out of interest, if anyone knows,
Cheers.