Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form validation in pop-up window

Status
Not open for further replies.

lbrandt

Programmer
Jul 9, 2001
3
US
I have a form that is in a pop-up window. The form submit's itself back to the main window. When I try to do validation on the form in the pop-up window I get an error sayin that my form elements are "null or not an object". If I create a simple page doing the same thing, I get no problems. but when I try and use the code for my REAL page I get this error. I am at the en of my rope!!! Any help will be greatly appreciated.
 
Try server-side form validation. The problem is that with Javascript, the form validation is done prior to submiting the query (before the information is passed for processing) such as <input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot; onclick=&quot;processme();&quot;>

On the otherhand, if you did form validation say in PHP or CGI, you can go ahead and send the form to your main window and have a script validate it.

If you are sending your form via a GET method, you could use Javascript in the main window and get the querystring, parse the query string, and then check the data. This is definitely not a good idea and is quite combersome.

Chad. ICQ: 54380631
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top