Variables Inside Javascript OnClick event <p>I have a program that ultimately sends a well formatted HTML based email via Exchange Web Services direct to customers.</p> <p>I am attempting to add a link to another web page, via a Javascript OnClick Popup window.</p> <p>This is the HTML I am using:</p> <pre><code>&lt;a href="javascript&amp;#58;;" onClick="window.open ( 'http://www.mydomain.co.uk/dlc/dlc_submission.php?branch=2&amp;policyref=" &amp; GlobalVariables.strPolRef &amp; "&amp;brand=Test', 'Submit DLC', 'scrollbars=no,width=720,height=320' ); "&gt;Submit Code&lt;/a&gt; </code></pre> <p>This URL would be made up of a variable "GlobalVariables.PolRef" which is the customer reference as it sends to a page that has hidden text boxes that then pass information to a Web Service.</p> <p>Within the application the HTML Body is contained within a variable _HTML.</p> <p>I usually replace all my HTML "s with a single quote ' because it doesn't play havoc with putting the entire HTML body string into a variable.</p> <p>However in this instance if I change javascript surrounding <code>href</code> - it totally ruins the code.</p> <p>Has anyone got an alternative solution to this for me please? Or can you point me in the right direction.</p>