asp form post, form validation, new window

Reply

Join Date: Jun 2006
Posts: 6
Reputation: dcparham is an unknown quantity at this point 
Solved Threads: 0
dcparham dcparham is offline Offline
Newbie Poster

asp form post, form validation, new window

 
0
  #1
Oct 8th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 89
Reputation: msaqib is an unknown quantity at this point 
Solved Threads: 1
msaqib msaqib is offline Offline
Junior Poster in Training

Re: asp form post, form validation, new window

 
0
  #2
Oct 18th, 2008
Ok...here is what you need to do.
  1. <script>
  2. function submitIt(myForm) {
  3. 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');
  4. myForm.target = 'Popup_Window';
  5. return true;
  6. }
  7. </script>
  8.  
  9. <form name="form1" method="POST" action="https://secureServerName/domain/register2.asp" onSubmit="return submitIt(this)">
  10. Form content
  11. </form>
Hopefully it should work for you.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 6
Reputation: dcparham is an unknown quantity at this point 
Solved Threads: 0
dcparham dcparham is offline Offline
Newbie Poster

Re: asp form post, form validation, new window

 
0
  #3
Oct 19th, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC