Click to See Complete Forum and Search --> : Javascript


alanr
March 29th, 2001, 11:00 AM
I am really struggling here, I am sorry to annoy you guys with my pitiful questions. WHy is this failing when I call it??

Please help???


<script language="javascript">

function PopUpWins()
{

myAddress=java.net.InetAddress.getLocalHost();
myAddress2=java.net.InetAddress.getLocalHost();
host=myAddress.getHostName();
ip=myAddress2.getHostAddress();
winStats='toolbar=no,location=no,directories=no,menubar=no,'
winStats+='scrollbars=yes,width=275,height=175'
if (navigator.appName.indexOf("Microsoft")>=0)
{
winStats+=', left=10, top=25'
}
else
{
winStats+=', screenX=10, screenY=25'
}
floater=window.open("","",winStats)
floater.document.writeln ("<html><title>IP Address</title>")
floater.document.writeln ("<b>You IP Address is:</b>
")
floater.document.writeln ( ip )
floater.document.writeln (" </html>")
}

</script>





alan@rencher.net
http://envelopebudget.com
Rate if it helped rank if it didn't!

Norm
March 29th, 2001, 04:52 PM
What is the failure? Do you know about the javascript: command in Netscape. It will display a console with the error message and line where it occurred. Enter javascript: in the Location: field.

BTW Javascript is not the same as Java. You'll probably get better answers on the javascript forum.

Norm