The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Load a window and validate on form submit

I need to set up a form that once submitted opens a window thats 550x400.
The form needs to be validated first however. I used an onClick event on the submit button but that opens the window regardless whether a user filled it out or not.

That might work if you add target="newwin" to the form, but you should move the validation from the submit's onclick to the form's onsubmit, because you can press enter to submit the form. If it still doesn't work, the URL of the page would be helpful.

This script disables the enter button (at the cost of doing what is necessary) simply because using an actual submit button (notice this isn't a submit button) is more trouble than I felt it was worth.

And, a new window is opened (from an encapsulated function) where the URL is specified. Thus, a target=_blank is unnecessary and would do what the previous solutions offered did: open 2 windows on occasion.

Not having a submit button doesn't disable pressing enter to submit the form.

I didn't say that a target=_blank was necessary, I said that a target=newwin was necessary. Yes, you did open a window in your "encapsulated" function, but it will have no effect on the form unless you specify the target to be newwin.

I simplified this. I first used dreamweaver to validate the form on onSubmit and redirected the user to a page where I placed an onLoad function. I also put a refresh in the meta tag to a specified URL for the parent window.

Thanks studio and Anarch for your input, however I found that If i look inward I could find a way out