PDA

View Full Version : JavaScript & SS Dynamic Programming


Pauly
December 9th, 2004, 17:49
Now I don't know if you can use anything else to check if JS is on or off other than JS itself, but if it's off then the user may experience an error or stuff just not working. Is this possible in PHP or another Server Side language? If it is can you let me know please?

If not:
I've been thinking about ways to accomodate for non-JS enabled browsers. Unfortunately people still turn them off, so here's my theory, and you knowledgable persons can tell me if it would work or not.

You use a PHP something else to 'run' a JavaScript command to return if JavaScript is enabled or not. If it returns true, it will give them, for example 'Menu A' but if it returns false, it displays 'Menu B'.

the_pm
December 9th, 2004, 19:40
Write menu A as a JavaScript function and call it into your page. Write menu B inside <noscript> tags.

Done ;)

Pauly
December 10th, 2004, 03:12
Aww you spoilt my brain racking fun :P

Thanks though I was curious, not a 'script' person myself, simple markup & pretty pictures is more my style ;)