Freelance Projects

All freelance projects at One Location


Html Or Javascript Code Neede  24.02.08

I have a website where I have been using an invisible popup to embed my affiliate links each time the page loads.

However now I need html or javascript code which will rotate 4 different affiliate websites after each page load and set the code so that it only shows for a period of time of once a day or once every 7 days.

For instance, when you enter the website it will embed a cookie from website1, and then when you click on another page or do a page reload it will embed website2 cookie, ect… to website 4. After 5 pageloads it will stop embedding cookies until a period of time 1 or 7 days for that user.

I need the working code within the next 24 hours or less. Please tell me your price.

Below is code which may be on the correct path…

<script>
<!– Begin
//Pop-under window - javascriptkit.com
var popunderSpaFinder=”http://www.mywebsite.com”
var winfeatures=”width=780,height=580,scrollbars=1,res izable=1,toolbar=1,location=1,menubar=1,status=1,d irectories=0″

var once_per_session=1

function get_cookie(Name) {
var search = Name + “=”
var returnvalue = “”;
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
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(off set, end))
}
}
return returnvalue;
}

function loadornot(){
if (get_cookie(’popunderSpaFinder’)==”){
loadpopunderSpaFinder()
document.cookie=”popunderSpaFinder=yes”
}
}

function loadpopunderSpaFinder(){
win2=window.open(popunderSpaFinder,”",winfeatures)
win2.blur()
window.focus()
}

if (once_per_session==0)
loadpopunderSpaFinder()
else
loadornot()
// End –>
</script>



If you liked this project, make sure you
Subscribe to Freelance Projects RSS feed!




    • Your Ads Here
    • Your Ads Here