Click to See Complete Forum and Search --> : <noscript>
flambor
07-28-2003, 06:01 AM
I have a menu on my website that uses javascript and css but it doesn't work when javascript is not enabled on the viewer's browser. How can I replace the whole thing or make it disappear when javascript is disabled?
The web site with the menu on is HERE (http://homepage.ntlworld.com/michael_naylor/test.htm)
Please make changes to the html and attach it back onto this thread for me to pick up. Thank you!
Gollum
07-28-2003, 06:13 AM
In a web app I have worked on, we had a splash-screen page at the beginning that included a big warning that said that if Javascript were disabled then the site wouldn't work properly. For browsers with javascript enabled, there was a script that removed the warning so that the users wouldn't see it.
flambor
07-28-2003, 06:42 AM
have you got this script, it may be useful.
Gollum
07-28-2003, 06:48 AM
Well, its not V.Complicated, but this is what it looks like
Somewhere in your HTML you have...
<layer id="warningLayer" top="535" width="520" bgcolor="#E4EBFB">
<div id="warning" class="WARNING" style="visibility:visible">
<h3>WARNING</h3>
This application has been designed to run on Netscape 4.7 and above and IE4 and above and requires ECMA v1 compliant Javascript. Without this, the application may not run correctly or you may not have access to all features.
</div>
</layer>
<script language="Javascript1.3">
if ( document.layers )
{
document.layers["warningLayer"].visibility = 'hidden';
}
else
{
var oWarning = document.getElementById('warning');
oWarning.style.visibility = 'hidden';
}
</script>
flambor
07-28-2003, 10:25 AM
how can i use this to create an alert when the user does not have javascript?