Hi there,
I've created a snippet with a mailto tag in it, which works fine. However, I'm trying to add javascript to the snippet to insert the current page/location into the subject, however the javascript is ignored.
I saw a thread where you edit the config file, and add a tag to one of the pages to point to the config file, however this isn't working.
Any help would be appreciated.
<snippet name="Support Contact">
<![CDATA[
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from old browsers
var OnLoadDone = false;
window.attachEvent("onload", new Function("StocklandContact();"));
function StocklandContact()
{
try{
//Check if already altered
if (!OnLoadDone)
{
var strPage = '';
strPage = document.URL; // or document.referrer;
// if (strReferrer != '')
// strReferrer = document.location;
var objAnchor = document.getElementById("AnchorHref");
if (objAnchor != null)
{
strPage.replace(":", "%3A");
strPage.replace(" ", "+");
objAnchor.href = objAnchor.href + " " + strPage;
}
OnLoadDone = true;
}
}
catch(ex) {
// do nothing
OnLoadDone = true;
}
}
//-- Stop hiding script -->
</SCRIPT>
<table class="ms-contactboxbg"><tr>
<td>
Contact:<br/>
<a id="AnchorHref" href="mailto:DL_IT_Intranet_SPSAdmin@stockland.com.au?subject=Feedback%20for%20Intranet%20site">Intranet Support</a>
</td></tr></table>
]]>
</snippet>
