PDA

View Full Version : Email to Javascript


digismile
Jun-12-2007, 07:21 PM
This isn't a problem but more curiosity. I've been working on a journal gallery page for a few days and I wanted to be able to include the Subject in the email line. I found several examples in the FAQ's and I've implemented FlyingDutchie's writeEmail javascript code found here (http://www.dgrin.com/showthread.php?p=222923#post222923).

I looked at a couple of sites, including Andy's, and they seem to always use the same syntax: ....******** language="javascript"> writeEMail('e-mail','From smugmug:').

When I use this, I have to change the 'e-mail' and the 'From smugmug:' to what I want the link to say and the subject line to say. The examples I saw did not. I did not see anything in their html or CSS where these variables were assigned. Does this mean that the values were hardcoded/assigned in the javascript? If so, why do this? Is it better? Wouldn't you want the flexibility of having a different link and subject?

Just trying to learn and understand what I'm doing.:D

My second, and somewhat related question, is that I am able to click on the email link in Explorer and launch my email, but not in FireFox. Is this just some Windows setting that prevents FF from launching my email? I wouldn't want someone who has FF to not be able to email me since they can't see the link.

Thanks,

Dna
Jun-12-2007, 11:43 PM
When I use this, I have to change the 'e-mail' and the AFrom smugmug:' to what I want the link to say and the subject line to say. The examples I saw did not. I did not see anything in their html or CSS where these variables were assigned. Does this mean that the values were hardcoded/assigned in the javascript? If so, why do this? Is it better? Wouldn't you want the flexibility of having a different link and subject? This is hardcoded in the javascript section so that spambots don't find the email and send lots of nice emails about enlargements and pills. :wink
My second, and somewhat related question, is that I am able to click on the email link in Explorer and launch my email, but not in FireFox. Is this just some Windows setting that prevents FF from launching my email? I wouldn't want someone who has FF to not be able to email me since they can't see the link.
Thanks,It should work in both.

Andrew

iamback
Jun-13-2007, 07:18 AM
My second, and somewhat related question, is that I am able to click on the email link in Explorer and launch my email, but not in FireFox. Is this just some Windows setting that prevents FF from launching my email? I wouldn't want someone who has FF to not be able to email me since they can't see the link.It might be configuration. Can you use this email link from FF? nobody@example.org (Don't worry, that belongs to no one and won't go anywhere; "example" domains really exist and are intended precisely for showing examples. Like an official black hole.)

If clicking on that email link does not result in FF firing up your email program, then you should configure it to tell it what program to use for email.