Mark, I agree with Joe.
Is it possible to see the full (final, after ASP stuff) code (i.e. the
source)?
/Robert
-----Ursprungligt meddelande-----
Fr=E5n: Mark Eckeard [mailto:meckeard2000@y...]
Skickat: den 12 november 2002 18:56
Till: JavaScript HowTo
=C4mne: [javascript_howto] Re: SV: Dynamic CSS file using Javascript
Robert,
I have tried in different locations, including the
HEAD.
After the code runs (an ASP page), I can view -->
source, but I don't see the line being written out.
All I see is the code below, almost like it ignores
it.
Thanks,
Mark
--- Robert Nyman <robert.nyman@c...> wrote:
> The code, at a first glance, seems ok.
> Where do you put this code in your document?
>
> Is it placed accordingly in the HEAD section?
>
>
> /Robert
>
>
> -----Ursprungligt meddelande-----
> Fr=E5n: meckeard2000@y...
> [mailto:meckeard2000@y...]
> Skickat: den 12 november 2002 16:06
> Till: JavaScript HowTo
> =C4mne: [javascript_howto] 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=3Dstylesheet
> TYPE=3Dtext/css
> HREF=3Dcss/CalPopUp1024.css>");
> }else{
> //800x680
> document.write("<LINK REL=3Dstylesheet
> TYPE=3Dtext/css
> HREF=3Dcss/CalPopUp800.css>");
> }
>
> What am I doing wrong?
>
> Thanks,
> Mark
>
>
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2