PDA

View Full Version : Ne6


LoubyLou
09-05-2002, 02:26 PM
About a year since I did any Javascripting but I,ve written simple script for password access to a page:


//Script begins

function PasswordCheck(){
var password;
password=document.pass.login.value
if (password=="open")
{
load('C:/Documents and Settings/Administrator/My Documents/Bournvilleward/success.htm');
}
else
{
load('C:/Documents and Settings/Administrator/My Documents/Bournvilleward/failure.htm');
}
}
function load(url)
{
location.href=url;
}

document.write('<form name="pass"><p>Enter password: <input type=password name="login"><input type=button value="LogIn" onClick="PasswordCheck()">')

//Script ends


now i know i have to jig it for old Netscape with document.layers
but i've noticed that there seems to be a common format dor DOM which works for IE6 and NE6 ?

if i am write how would the code:

document.form.textbox.value be written

Also i would be sooooo grateful if someone could tell me syntax for same line using document.layers