javascript_howto thread: Dynamic CSS file using Javascript
Hi,
I need to dynamically include a .css file based on screen resolution. But
I cannot get the line to write to the browser:
if(screen.width<1280||screen.height<1024){
//1028x768
document.write("<LINK REL=stylesheet TYPE=text/css
HREF=css/CalPopUp1024.css>");
}else{
//800x680
document.write("<LINK REL=stylesheet TYPE=text/css
HREF=css/CalPopUp800.css>");
}
What am I doing wrong?
Thanks,
Mark
|





