Issues with your account? Bug us in the Discord!

Probably a stupid question but...

JackNJackN <font color=#99FF99>Lightwave Alien</font>
In a web page, I want to use an Image with URL mapping to replace a snazzy JavaScript Menu, if JavaScript is turned off in the browser.

If JavaScript is turned off, then the test for navigator.javaEnabled() should return a boolean "False".

How the hell can I test that if JavaScript is turned off!?! The Script wouldn't even run then...

:confused:

Anybody have a solution for my problem, or a link to point me too?

Comments

  • JackNJackN <font color=#99FF99>Lightwave Alien</font>
    By the way, the server that this page will be on has PHP capability, so if there is a PHP way to test for JavaScript in the browser, before compiling to the page with its choice of image or menu script, I'm all ears!

    ;)

    I don't know PHP well enough yet...

    :D
  • JackNJackN <font color=#99FF99>Lightwave Alien</font>
    Or even a way to hide the image map behind the script in a HTML/CSS layer?

    Whatever works! Help!
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    I don't know php at all, but I would be very surprised if you couldn't get the browser properties in it and check for java support.

    Try this:
    [url]http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20995840.html[/url]
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    Also this:
    [url]http://groups.google.co.nz/groups?hl=en&lr=&ie=UTF-8&threadm=3e4a1f77_1%40news.tiscalinet.ch&rnum=1&prev=/groups%3Fq%3Dcheck%2Bjavascript%2Bsupport%2Bgroup:alt.comp.lang.php%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dalt.comp.lang.php%26selm%3D3e4a1f77_1%2540news.tiscalinet.ch%26rnum%3D1[/url]
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    I would think the best way is probably a redirect to an index.php that takes an argument depending on if javascript is enabled or not. Then use a different redirect in the noscript tag to outside it. But I'm not an expert web designer so don't quote me on that. :)
  • JackNJackN <font color=#99FF99>Lightwave Alien</font>
    Ah yes... The < NOSCRIPT > tag...

    That might actually get me somewhere!

    Thanks man!

    ;)
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    I'd never heard of it before, myself. :)
  • JackNJackN <font color=#99FF99>Lightwave Alien</font>
    This seems to be what I need, and will be a lot less work than using PHP to test for it...

    [URL=http://www.w3schools.com/tags/tag_noscript.asp]The NOSCRIPT Tag[/URL]

    ;)
  • JackNJackN <font color=#99FF99>Lightwave Alien</font>
    Yay! It works! Woo Hoo!

    :D
  • C_MonC_Mon A Genuine Sucker
    YAY!!:D
    Now we can all be happy!
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    Always happy!
  • C_MonC_Mon A Genuine Sucker
    Right! :rolleyes:
  • RubberEagleRubberEagle What's a rubber eagle used for, anyway?
    cool.... I would have put a javascript redirect to another page on the index page, but since someone actually thought of creating a -tag... :)
Sign In or Register to comment.