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.

1 Submit Button -2 actions

Okay, so I've been trying to do this in DW. It works in Safari but not in IE. I'm trying to get a user to submit their name and eMail address when they click the submit button and then be taken to a new page. In Safari, both these things happen (however, their email proram pops up with the submitted data, but they don't have to submit it- the new page still loads).
In IE, the email is automatically sent, but the new window doesn't open.
Here is the code;
in the head-
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

Honestly...

...I wouldn't use javascript for this, I'd use PHP. It's more secure and will work on everyone's browser. I'm sorry I can't help you more than that, but check out Kevin Yank's "Advanced E-mail" article, it'll tell you everything that you need to know.

As far as I can tell, javascript doesn't have any mailing capabilities. A 'mailto' url is basic html, and when I try it with IE6, the email does not get sent automatically(I think that would be a security issue if it did). I think earlier browsers might have allowed it, but since it was a security problem that allowed a web site to silently harvest emails from visitors, it was plugged up.

I'm trying to get a user to submit their name and eMail address when they click the submit button and then be taken to a new page.

Reading your question again, it seems you may have a form where the user fills out their name and email address and then clicks on the submit button. Since you want to submit the data to the server, the page listed in the action attribute:

<form action="..."

will process the data on the server side, and presumably record the data in your database, and then send some new content to the browser. Where does javascript come into play?

Reading your question again, it seems you may have a form where the user fills out their name and email address and then clicks on the submit button. Since you want to submit the data to the server, the page listed in the action attribute:

<form action="..."

will process the data on the server side, and presumably record the data in your database, and then send some new content to the browser. Where does javascript come into play?

Actually, I want the info emailed to me. I'm not sure if i'm explaining this right, but when the user hits the submit button, I want their info emailed to me and have them taken to a new page.