Click to See Complete Forum and Search --> : Help making this script .....


Tasmanian Devil
06-18-2003, 07:28 PM
Can someone help me? I have a script that I like but does not work in netscape. Can you help? Code is as follows:

<SCRIPT LANGUAGE="JavaScript">
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();

if (username=="new user") { window.open('http:\/\/foxvalleynews.com/new user login.html','','resizeable=yes,scrollbars=yes,menubar=no,width='+screen.width+',height='+screen.heig ht+',left=0,top=0');window.close(); done=1; }

if (done==0) { alert("Invalid Username!"); }
}
End -->
</SCRIPT>

Thanks
Devil

SearedIce
06-18-2003, 08:42 PM
http:\/\/foxvalleynews.com/new user login. html

you might mean: (?)

http:\/\/www.foxvalleynews.com/new%20user%20login.html
or:
http:\/\/www.foxvalleynews.com/newuserlogin.html

are the + signs in the width='' and height parts neccessary?

also...i've found that sometimes no semicolon is needed after commands that are within an if() block (the stuff between the { and } after an if(something==something) statement)

also, see the End -->?
you never "began"...you might just want to delete this line :)

~John

Tasmanian Devil
06-19-2003, 07:59 AM
Dave~
I do not know how to check the errors in netscape, not sure how to turn it on as well. When submitted, netscape just sits there and does nothing.

pyro
06-19-2003, 08:14 AM
To check for javascript error messages in NN, just type javascript: in the address bar...