PDA

View Full Version : Email Riddler



McWin
11-01-2006, 10:14 PM
1) Script Title: Email Riddler

2) Script URL (on DD): http://www.dynamicdrive.com/emailriddler/

3) Describe problem: I am trying to use email riddler in a form where I post an email with order info in it.

<form name="formcheck" onSubmit="return formCheck(this);" form action="mailto:'+postemailxxx+'?subject=Web contact"; method="post">

It will not post the mail properly and it tries to post to +postmailxxxx.

Have I not got the javascript correct? Can anyone see what I have incorrect?

Thanks a lot I appreciate any light on the matter.:(

ddadmin
11-01-2006, 11:42 PM
Well, you can't just embed a JavaScript variable directly inside your HTML code. :) This is explained on the Email Riddler page. In your case, you could do something like:



<form id="formcheck" name="formcheck" onSubmit="return formCheck(this);" form action=""; method="post">
"
"
</form>

<script type="text/javascript">

document.getElementById("formcheck").action="mailto:"+postemailxxx+"?subject=Web contact"

</script>


That should work.