Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: JavaScript enabled/disabled - how to plan for both?


Message #1 by "Roberta Laidman" <laidman@l...> on Fri, 7 Dec 2001 02:05:59
Kathleen,
Very concise solution...I was hoping not to be able to do javaScript non-
javaScript on the same page...but I don't think that's going to happen.
Thank you for response, I'm off to design the 'white bread' (no peanut 
butter and jelly!) version.
Roberta Laidman 




> Here's what I do.  I design a page that has no javascript code in it. 
It's 
> a very plain page, no rollovers no scripting of any kind.  At the top of 
> that page I put the following script. 
> <script language="javascript">
> location.replace("Photo_Gallery_Script.htm");   //This will redirect the 
> user to a page that displays the same data using JavaScript.
> </script>
> 
> If they have JavaScript turned on, this will automatically redirect them 
> to a page that does contain scripts. 
> Then I enclose the rest of the page within a <noscript> tag.  Basically 
my 
> page looks like this.
> 
> 
> <html>
> <HEAD>
> <title>this page is done</title>
> </head>
> <body>
> <script language="javascript">
> location.replace("Photo_Gallery_Script.htm");   //This will redirect the 
> user to a page that displays the same data using JavaScript.
> </script>
> 
> <NOSCRIPT>
> The body of my plain page goes here
> </NOSCRIPT>
> </BODY>
> </HTML>
> 
> Hope this helps.
> ---ORIGINAL MESSAGE---
> I noticed on the bigger sites visitors get different presentations 
> depending
> on whether they have JavaScript enabled.
> 
> When the page loads, does a script run which determines whether or not 
the
> site visitor has JavaScript turned on?
> 
> Can I design for both viewers on one single html page?  Using layers?
> tables? frames?

  Return to Index