Alright, I have a basic code I found at JavaScript Kit
I would kindly like some help getting code to open an alert box when they close or leave a certain domain. The following script is from the above mentioned site.
Is there a way to modify this sectionCode:<script type="text/javascript"> //Get cookie routine by Shelley Powers function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) // if cookie exists if (offset != -1) { offset += search.length // set index of beginning of value end = document.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function setcolor(what){ document.body.style.backgroundColor=what document.cookie="bgcolor="+what } if (get_cookie("bgcolor")!="") document.body.style.backgroundColor=get_cookie("bgcolor") </script>
or whichever section needs the alert code, so that it calls up an alert box?Code:function setcolor(what){ document.body.style.backgroundColor=what document.cookie="bgcolor="+what } if (get_cookie("bgcolor")!="") document.body.style.backgroundColor=get_cookie("bgcolor")
Please help. I'm not a JS expert I only have basic knowledge and right now I do not have resources or time to fully "learn" the expansive amount of JS knowledge to create this code myself.
Thanks!
Metallifan15![]()


Reply With Quote
Bookmarks