Click to See Complete Forum and Search --> : javascript enabled?


Webskater
09-28-2004, 04:35 AM
A site I am building at the moment has a few public pages - which I need to make accessible to everyone. However, if the visitor has javascript enabled, I want to detect this and take them to pages that use javascript. I know <noscript></noscript> detects this but how can I access whether "<noscript>" is true or not?

I want to say:

IF this person does not have javascript enabled
Direct them to the non-javascript pages
ELSE
Direct them to the pages that use javascript
END IF

Also, is there anything else I need to check for - can you tell what devices certain users might be using and do you need to accommodate them in some specific way?

And, finally, is there anywhere you can get sites checked to ensure that people with specific disabilities can, or cannot, use them?

Thanks for any help.

Charles
09-28-2004, 04:42 AM
<script type="text/javascript">location = javaScriptVersion.html"</script>

However, it's a bad idea to use it. Once people start linking to your site, they'll link to the JavaScript pages. You can minimize the problem with a "preffered link" notice on each page but the best practice is to make each page transition well. It's also great sport.

Kor
09-28-2004, 05:13 AM
I want to say:

IF this person does not have javascript enabled
Direct them to the non-javascript pages
ELSE
Direct them to the pages that use javascript
END IF


This kind of <noscript> will do the job

<noscript>
<meta http-equiv="refresh" content="0; url=nonjavascript.html">
</noscript>


However, it's a bad idea to use it. Once people start linking to your site, they'll link to the JavaScript pages.


That is normal, as long as most users are javascript enabled. Seems resonable to start with the majority, neh?


the best practice is to make each page transition well. It's also great sport.


When building pages for clients, pressed by very short dead lines, it will not appear to you as a sport. I reckon it is a great job to create perfect pages, which can look almost the same both for javascript enable and disable, but most of the time you have no time for that and your client woun't pay you extra money for this. My oppinion is to use javascript only if it is absolutely necessary and thare is no other resonable way to substitute javascript code with a HTML or a CSS solution. If so, just use javascript and don't bother about the javascript disabled.

Fang
09-28-2004, 05:39 AM
Updating two pages is doubling your work load.
Do as much as possible with html and server side includes and add the javascript to enhance the page.

JPnyc
09-28-2004, 06:30 AM
Best solution is what was mentioned above. Don't make the JS crucial to navigation, but if you're determined to, have the main index page be the non JS page, with a redirect to the JS page IF they have JS enabled. IF they don't, well the redirect simply won't do anything.

Fang
09-28-2004, 07:23 AM
Best solution: one page.

Charles
09-28-2004, 07:31 AM
Originally posted by Fang
Best solution: one page. Easiest to maintain, least ammount of typing to establish, less to go wrong. It does, however, require a level of cognative ability that may be beyond some.

Kor
09-29-2004, 02:05 AM
require a level of cognative ability that may be beyond some.

"...said the actress to the bishop...":D

Webskater
09-30-2004, 04:28 PM
Thanks for your answers.