our website opens a NEW registration window [target="_blank"], register1.asp which submits form data to register2.asp "write to database" and "thank you for registering" page, by way of js form validation function - >>>i need to cause register2.asp to open without the ability to hit the BACK button [ie, no menu bar or address bar].<<< reason: people are registering online, then hitting BACK and hitting submit AGAIN, causing multiple database entries. <argh>

more simply: website opens new registration page, register1.asp. user submits info which gets form validated before sending to register2.asp. register2.asp need NO menu.

some code:
<form name="form1" method="POST" action="https://secureServerName/domain/register2.asp" onSubmit="return submitIt(this)">

this first passes form data to "submitIt()" function with "this" [this is the form data]. if everything passes TRUE, then it passes control to register2.asp. I need this register2.asp to NOT have a menubar.

I hope this does not sound too messy, and any ideas anyone?? thanks in advance for your time.

Ok...here is what you need to do.

<script>
function submitIt(myForm) {
var w = window.open('about:blank','Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=yes,resizable=yes,copyhistory=yes,width=200,height=200,left=10,top=10');
myForm.target = 'Popup_Window';
return true;
}
</script>

<form name="form1" method="POST" action="https://secureServerName/domain/register2.asp" onSubmit="return submitIt(this)">
Form content
</form>

Hopefully it should work for you.

thx, but i get error saying zero length field not allowed[database error] - doesn't seem to send the form data via the var w. wishing now there were some parameters when sending data via method="post", that would define the target window with no menu. my code with your suggestions - [form name is "form1"]:

var w = window.open('https://servername.ntsecure.net/domain/filename.asp','registerSendInfo','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=yes,resizable=yes,copyhistory=yes,width=200,height=200,left=10,top=10');
document.form1.target = 'registerSendInfo';
return true;
}//END submitIt

thx, though - i am tempted but not looking forward to creating code to check and reject if form data entered already exists in the database.

This article has been dead for over six months. Start a new discussion instead.