I'd try:
Code:
<script type="text/javascript">
if(!readCookie('wroteIt')){
document.write('<script type="text/javascript" src="http://app.getresponse.com/view_webform.js?wid=#####"></script>');
createCookie('wroteIt', 'wroteIt', 6 * 30); // about 6 months
}
</script>
Now that should go right where:
Code:
<script type="text/javascript" src="http://app.getresponse.com/view_webform.js?wid=#####"></script>
was, and the other part of the code (which could be made external):
Code:
<script type="text/javascript">
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}
</script>
should go above that. You don't need any of the HTML code from my previous post. That was all simply to make a page to showcase the two scripts on. You already have a page.
The browser cache may need to be cleared and/or the page refreshed to see changes.
If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks