Redirect HTML form to page other than action=""

Hello,

I have a form in which i need to redirect somewhere other than where the form is submitted to. Is this possible with javascript? I’m not a javascript programmer so I need help.

I basically have a form that adds the submission to Google groups but instead of the default google groups page I want it to redirect back to my site.

Here is a sample of my code:

  <form id="info" method="post" onSubmit="window.location='http://mysite.com'" action="http://groups.google.com/group/mygroup/boxsubscribe">
  <input type="hidden" name="hl" value="en">

	<input id="uremail" type="text" value="email" name="email" size="29"/>
		<input type="submit" id="usent" name="submit" value="Send" />
	</form>

I’ve also tried adding this:

 <input type="hidden" name="redirect" value="www.mysite.com"> 

thanks in advance for any help.

Do you still want the form to be submitted to google groups, as well as having the person being redirected back to your site?

Yes, basically it adds a member to the google group but I don’t want to see the ugly google pages…

One way is to use the onsubmit event to open a new window to your web site. That’s normally the best way because then the person can still go back and find out about the group they were subscribed to.

If you want to hide things further than that, you’re going to be forced to do things asynchronously, by using some AJAX techniques to submit the form, and on a successful submission to then navigate to a different page.