Click to See Complete Forum and Search --> : Users that dont allow javascript?


adamthenewbie
08-13-2003, 08:16 AM
I am using javascript to tell if the users browser supports iframes. I have a function that checks users browser and sets browserCheck to yes (For if they have a browser that handles iframes) or no. The only problem with this though is if the users browser doesnt support javascript. Is there a way that I can make another link only if the users browser doesnt support javascript???

Here is the code for one link

<script language = "javascript">
if (browserCheck == "no")
{
document.write("<A HREF=\"#\" onclick = \"storeOld();\">");
}
else
{
document.write("<A HREF=\"default.php?content=store\">");
}
</script>

Thanks
Adam

pyro
08-13-2003, 08:20 AM
That is what the <noscript> tag is for:

<noscript>
<p>Visit our accessable, <a href="nojs.htm">javascript free</a> site...</p>
</noscript>

BTW, the language attribute for javascript has been depreciated. You should use the type attribute instead:

<script type="text/javascript">

adamthenewbie
08-13-2003, 08:27 AM
thank you. Sorry I am quite new to this... I appreciate it :)

pyro
08-13-2003, 08:37 AM
Happy to help... :)