OK – I am totally not a programmer – most of the time I just take public scripts and tweak them a little for my simple needs, but I can’t figure this one out. Any help appreciated!
I have a page where I have been using a js to “hide” email addresses from spambots. Recently, there was a need to add a cc: to one of the addresses on the page, but not the other. I could have done this if it was for both addresses, but not for just one! Here is the script as I have it now (which does both addresses.) How would I change this to just do one?
(In <head> section>)
[INDENT]
<script language=”JavaScript” type=”text/javascript”>
<!–
var domain = “maindomain.com”;
var at = “@”;
var copi = “?cc=copiedmail”;
var copidomain = “copydomain.com”;
function email_me(username)
{
var complete_email = “mailto:” + username + at + domain + copi + at + copidomain;
window.status = complete_email;
location.href = complete_email;
}
function sb_write_email(username)
{
var complete_email = “mailto:” + username + at + domain + copi + at + copidomain;
window.status = complete_email;
}
function sb_clear_email()
{
window.status = “”;
}
//–>
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//–>
</script>
[/INDENT]
In link on page:
[INDENT]
<a href=”javascript:void();” onClick=”email_me(‘main_email1’)” OnMouseOver=”sb_write_email(‘main_email1’);return true” onMouseOut=”sb_clear_email();return true”>Click here to email First Person </a></p>
<a href=”javascript:void();” onClick=”email_me(‘main_email2’)” OnMouseOver=”sb_write_email(‘main_email2’);return true” onMouseOut=”sb_clear_email();return true”>Click here to email Second Person </a></p>
[/INDENT]
I want to change this script up so that the cc works on the first email address, but not the second one. Right now it is working, but for both of them.
Please let me know if I am not making sense – – and thank you for any help you can give me.
– Tiffany