| | |
asp form post, form validation, new window
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2006
Posts: 6
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Sep 2004
Posts: 89
Reputation:
Solved Threads: 1
Ok...here is what you need to do.
Hopefully it should work for you.
html Syntax (Toggle Plain Text)
<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>
•
•
Join Date: Jun 2006
Posts: 6
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
Other Threads in the ASP Forum
- Previous Thread: ASP and Connectivity
- Next Thread: server problems? passing variable info...
| Thread Tools | Search this Thread |
Tag cloud for ASP
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit web webserver windows7





