memory trip: excite
Friday, 19. January 2007, 18:54:10
How time flies and people learn..
Friday, 19. January 2007, 18:54:10
Microsoft against VBScript plugin sniffers!quirky arguments![]()
You must be logged in to write a comment. if you're not a registered member, please sign up.
Never attribute to stupidity that which can be adequately explained by deadlines
When IE 8 is released in a final version and if they do a better ...
Chas4 thanks for that login link. I can now sign in. I had the h ...
The script is a user script that uses a hotkey to enumerate all ...
I am having soooooo much trouble with GWT. It takes hours on end ...
also this some times helps if you can't get in https://login.li ...
Originally posted by hallvors:
I must admit that I used this too in my personal website. It doesn't "feel right" though and since you call it a strange approach, I hope you have a suggestion for improvement.What I do is the following: I have certain elements that I want to hide by default and then use some JavaScript to show them when the visitor wants to. But I don't want to be unfriendly to those who have JS off. My approach is to hide these elements with JS (so people without JS can still see them).
The option to do it from <body onload="hideElementsFunction"> has an ugly side effect, namely that for a split second you do see all contents of the page until they're hidden by the script. So I inserted a <script> element in the <head> of my document, which document.writes a style element doing the trick for me. The good thing is that it is simple and works in my three main test browsers (Opera's latest final, FF latest version, IE7). The bad thing is that I'm probably demonstrating I still have much to learn about coding.
Btw, here's the page I'm talking about.
By scipio, # 20. January 2007, 13:10:14
By malcam, # 21. January 2007, 04:59:56
By towolf, # 22. January 2007, 02:44:28
By hallvors, # 22. January 2007, 14:27:14
BODY.jsenabled .lowfi{ display: none }
and then just run
document.body.className+=' jsenabled';
somewhere in the document. Of course the quirk here is that it must not run until document.body has been defined, but adding a script with this content anywhere inside body should work in most if not all browsers..
By hallvors, # 22. January 2007, 14:31:09
Originally posted by hallvors:
Thanks, hallvors. Do you really consider this more elegant than using document.write?By scipio, # 22. January 2007, 14:35:23
By _Grey_, # 23. January 2007, 19:06:12