Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>Netscape Problems :-(

Netscape Problems :-(

boxxer03
11-23-2005, 09:47 PM
Can anyone tell me if the navigator.javaEnabled() is only an IE property or what? I have a code that uses that to see if java is enabled, changes it from true or false, to enabled or disabled, and then displays the result. It's saying that my java is disabled in NS even though I checked and it's not, maybe it's just my code, but can someone let me know, cause it's driving me nuts! :)

Here is my code:
var jend=navigator.javaEnabled()

if (jend==true){
document.write('<font face="verdana" style="font-size:10pt; color:000000"><b>Javascript is:&nbsp; </b><font color="#00CC00"><b>Enabled</b></font>.</font><br>')
}
else if (jend==false){
document.write('<font face="verdana" style="font-size:10pt; color:000000"><b>Javascript is:&nbsp; </b><font color="#FF0000"><b>Disabled</b></font>. [JavaScript should be <b>enabled</b> to best view this site.]</font><br>')
}
else if(jend!=true&&jend!=false){
document.write('<font face="verdana" style="font-size:10pt; color:000000"><b>Javascript is:&nbsp; </b><font color="#FF0000"><b>Undetermined</b></font>.</font><br>')
}

boxxer03
11-23-2005, 09:54 PM
you can see the code in action here: http://savepitbulls.8m.com/opti.html

_Aerospace_Eng_
11-23-2005, 10:04 PM
The function does work only its detecting if Java is enabled NOT javascript. Java and JavaScript are two different languages.

boxxer03
11-23-2005, 10:07 PM
LoL, i'm an idiot. I know that there different, but my brain just crapped out. LoL thanks though ;)

_Aerospace_Eng_
11-23-2005, 10:11 PM
LoL, i'm an idiot. I know that there different, but my brain just crapped out. LoL thanks though ;)
It happens, just think about it, how would it detect if JS is enabled or disabled? If it was disabled then the script wouldn't even run.

boxxer03
11-23-2005, 10:23 PM
LoL, that's the bad thing, cause I put a little warning kind of thing in there, that said if nothing shows up below then JavaScript is disabled.

kansel
11-23-2005, 10:38 PM
<script type="text/javascript">
document.write("JavaScript is enabled");
</script>
<noscript>JavaScript is disabled</noscript>

The message inside the <noscript> tag will only show up when JavaScript is turned off.


 

TOP

Hyperthreading hurts s
HP sharpens blade PC l
Apple goes for Quad po
Itanium gets scaled do

For more info

Hyperthreading hurts s
HP sharpens blade PC l
problem with an ImageP
Modifying a navigation
convert text to intege
Anyone knows to clear 
Automatically generate
document.getElementByI
Hi question about stor
Netscape Problems :-( 

News Archive

Month and Year drop do
navigation button/imag
doubt in window.open()
undo redo script 
Mimick "View Source" w
print Question 
No-image representatio
What's wrong with this
Urgent help in Javascr
Gurt Menu assistance 

Related stories:

Anyone knows to clear the contents of the window !!! in javascript
Automatically generates color tags(<color="red">,</color>)
document.getElementByID() Issues
Adding onclick stuff to an INPUT through javascript
problem with an ImagePreview js
Can function RETURN a value?
do I need a random script script or not?

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics