PDA

View Full Version : Email Riddler problem



noopara
01-08-2015, 08:46 PM
1) Script Title:Email Riddler

2) Script URL (on DD):

3) Describe problem: It's not sending the email

I have been using the old version on a site for years without a problem. This is the first time I have tried using the new version. The old version uses a statement like this:
document.write("<input type=\"hidden\" name=\"recipient\" value=\"" + postemail6485 + "\">");

This new version does not. I don't quite understand how this new version can work. Perhaps there is a typo somewhere??

The old version was embeded in a shtml page as is this new one.

Here's is what I have now which is not sending the email. Thanks for the help.

<script type="text/javascript">
/*<![CDATA[*/

/***********************************************
* Encrypt Email script- Please keep notice intact
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/
<!-- Encrypted version of: admin [at] ********.*** //-->

var emailriddlerarray=[bunch of numbers]
var encryptedemail_id66='' //variable to contain encrypted email
for (var i=0; i<emailriddlerarray.length; i++)
encryptedemail_id66+=String.fromCharCode(emailriddlerarray[i])

//--- VARIABLE "encryptedemail_id66" NOW CONTAINS YOUR ENCRYPTED EMAIL. USE AS DESIRED. ---//

/*]]>*/
</script>

<FORM ACTION="http://formmail.dreamhost.com/cgi-bin/formmail.cgi" method="POST">

<input type="hidden" id="recipient" value="" /> <!-- this doesn't look right -->

[bunch of form stuff goes here]

</Form>

<script type="text/javascript">
document.getElementById("recipient").value=encryptedemail_id66
</script>

ddadmin
01-09-2015, 06:19 AM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Actually, none of the versions wrote out the generated email into a form element, you've always had to do it manually like you've done above. From the look of your code above it seems your added code should work. Just to confirm the form itself works, what happens if you comment out the below:


<script type="text/javascript">
//document.getElementById("recipient").value=encryptedemail_id66
</script>

and just enter an email address into the hidden form field, unencrypted:


<input type="hidden" id="recipient" value="whatever@youremail.com" />

Do you receive the contents of the form that way?

Beverleyh
01-09-2015, 06:23 AM
The email riddler generates this output;
<script type="text/javascript">
/*<![CDATA[*/

/***********************************************
* Encrypt Email script- Please keep notice intact
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/
<!-- Encrypted version of: you [at] **********.*** //-->

var emailriddlerarray=[121,111,117,64,121,111,117,114,100,111,109,97,105,110,46,99,111,109]
var encryptedemail_id43='' //variable to contain encrypted email
for (var i=0; i<emailriddlerarray.length; i++)
encryptedemail_id43+=String.fromCharCode(emailriddlerarray[i])

document.write('<a href="mailto:'+encryptedemail_id43+'">Contact Us</a>')

/*]]>*/
</script>

The tool on DD was last updated in 2007 so I'm not sure what new version you're using, but as you can see, it still uses document.write

The part that you have identified as not looking right relates to the additional usage info on the demo/tool page - a way of passing the generated variable in a hidden form field. It looks like you are passing this variable through a 3rd party service though - can you confirm that this service is fully functional? Maybe *they* have changed something?

I use this script myself and it still works fine for me.