Jump to content

Recommended Posts

Posted

It has just been pointed out to me that all the emails on one of my sites all go to the same person. Now they are set up with javascript to go to individuals. This is the page http://www.holytrinity-madeira.org/meet_us.php

All the forwarders are in place, but I notice that when you click on the link it opens with the same email address for all.

Any help on this one please.

Posted

Thanks Virtual, will get someone else to check that out as one of the Church wardens uses Firefox on Mac.

 

Seemed to remember you helped out once before on some css, as it rendered differently on the mac. Now got a problem with it on IE7 and a bit on IE8.

 

Hoping someone will have the solution for me.

Posted

I think it's happening because you're setting onclick="parent.location=Mailme" and not an actual e-mail address. Everytime the script runs that sets the email, it will overwrite the previous Mailme variable. So when the browser finishes rendering that page, var Mailme will have treasurer@holytrinity-madeira.org.

 

However if you do

 

document.write("onclick=\"parent.location="+Mailme+"\"> ");

 

It should fix the mail problem.

 

However it still doesn't fix the Mac problem, it seems like a Javascript issue, Mac's don't understand parent.location or something, not really sure what the problem is as I'm on a PC.

Posted (edited)

Well another option is to create a different variable each time. Mailme1, Mailme2, Mailme3 etc, that way your variables won't get overwritten.

 

 

Edit:

 

Sorry on my original post I forgot the single quotes. Here's the revised version:

 


 

Note the single quotes before and after "+Mailme+"

Edited by BeeDev
Posted

Thanks, it is now working properly.

I had spent some time trying different quotes to see what happened, what I hadn't tried was the use of both.

Posted

OK I just went back and checked your revised version. On Firefox nothing at all happens, in Safari it opens the native Mac Mail program and Opera does too.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...