Hi am wondering if u can give me a little help with some code. Im a little new to JS so please bare with me :)
Im creating a login code for our clients to visit a section on our website that is personnal to them. I wanted to stay away from the php side for this website.
The section does not need to be very secure, but the code i have at the moment allows the users to log in but it does not open a new browser window, it opens the page in the current browser window which obviously shows the URL in the search bar! I want to avoid showing anyone the URL. So i thought about the window.open command. Having a new window pop up will allow me to show the page with no Header search abr or anything i prosume? If so how do i implement this into my code?
I have attached the section of code im using as the login button.
if(imgSubmit == ""){
document.write( '<input type="button" value="Logon" name="Logon" onclick="login( username.value, password.value, window.open)">' );
} else {
document.write( '<input type="image" src="'+imgSubmi t+'" name="Logon" onclick="login( username.value, password.value) ">');
}
This is my code for the login button used in JS. I just want to know where to put the window.open line of code. I think its within the onclick line but im not sure!
Any help would be much appreciated :)
Cheers.
Im creating a login code for our clients to visit a section on our website that is personnal to them. I wanted to stay away from the php side for this website.
The section does not need to be very secure, but the code i have at the moment allows the users to log in but it does not open a new browser window, it opens the page in the current browser window which obviously shows the URL in the search bar! I want to avoid showing anyone the URL. So i thought about the window.open command. Having a new window pop up will allow me to show the page with no Header search abr or anything i prosume? If so how do i implement this into my code?
I have attached the section of code im using as the login button.
if(imgSubmit == ""){
document.write( '<input type="button" value="Logon" name="Logon" onclick="login( username.value, password.value, window.open)">' );
} else {
document.write( '<input type="image" src="'+imgSubmi t+'" name="Logon" onclick="login( username.value, password.value) ">');
}
This is my code for the login button used in JS. I just want to know where to put the window.open line of code. I think its within the onclick line but im not sure!
Any help would be much appreciated :)
Cheers.
Comment