bascherz
Member
I have a table that contains user ids for which I can easily write PHP to do a row-by-row join query to get an array of email addresses. The PHP part I can handle. And I can prepare the entire "mailto:" link that I want to send to JS so it will do window.open(themailtolink).
So, how do I get that PHP variable's data into the JS in the plugin? Does the PHP execute before the JS or vice versa? From reading the help, it seems the JS is run at the end. Good.
So just envision in the PHP code, this has happened:
Now I want to do this in the JS area:
How do I get that string from PHP to JS? I have tried outputting the JS with PHP embedded in an echo statement in the PHP code, but that didn't work.
Thanks anyone in advance. I'm stuck.
Bruce
So, how do I get that PHP variable's data into the JS in the plugin? Does the PHP execute before the JS or vice versa? From reading the help, it seems the JS is run at the end. Good.
So just envision in the PHP code, this has happened:
Code:
$mailtolink = "mailto:username@example.com?subject=Subject&body=message%20goes%20here";
Now I want to do this in the JS area:
Code:
windows.open(mailtolink);
How do I get that string from PHP to JS? I have tried outputting the JS with PHP embedded in an echo statement in the PHP code, but that didn't work.
Thanks anyone in advance. I'm stuck.
Bruce