I have the following piece of code:
$output->Text('<td width=250"><P ALIGN="center"><IMG NAME="button" SRC="image/image.gif"></A><BR><BR><A HREF="' .$url. '?pic=1">Link name</A></P>');
This is dynamically creating a URL on my page.
I also have a Javascript function that controlls how the link opens (window size, etc...) called open_archive. When I place it in the code before the PHP variable, it doesn't work. If the URL were a normal hard coded URL, it works fine, like this:
$output->Text('<td width=250"><P ALIGN="center"><IMG NAME="button" SRC="image/image.gif"></A><BR><BR><A HREF="javascript:open_archive(\' [url]http://www.tsn.ca\[/url]');>Link name</A></P>');
Anyone have any ideas how I can add the javascript to the variable script?