Hello, I need the following items to change on page load only is main issue I’m having but they won’t and really could use some help. They only will if there is an alert plus a setTimeout both included in the script as well. Demo script found here: [url]http://www.mooonbaby.com/testkook.html
If one cookie is read goes to next item and sets a cookie. If that cookie is read goes to next item and sets a different cookie and so on. Need it to change from one item to the next on page load only instead without the alerts and settimeouts. Please don’t redo most of the code so I can understand any changes that are being made in case I need to redo any more. Can someone please tell me how to have these items change by cookie by page load only? Please let me know, thank you very much.
[QUOTE]
var kie=[];
kie[1] = [“<img style=’margin-left: 0px;margin-top:0px’ title=’Image’ border=’0′ src=’
kie[2] = [“<img style=’margin-left: 0px;margin-top:0px’ title=’Image’ border=’0′ src=’
kie[3] = [“<img style=’margin-left: 0px;margin-top:0px’ title=’Image’ border=’0′ src=’
kie[4] = [“<img style=’margin-left: 0px;margin-top:0px’ title=’Image’ border=’0′ src=’
kie[5] = [“<img style=’margin-left: 0px;margin-top:0px’ title=’Image’ border=’0′ src=’
document.cookie = ‘o=o; expires=Aug 2009 UTC; path=/’
var counter = 1;
function getkie()
{if (document.cookie=’o=o’){
document.getElementById(“kie”).innerHTML = kie[counter];
counter++; if (counter == kie.length)
{counter = 1; } alert(document.cookie); setTimeout(‘getkie()’, 9000); document.cookie = ‘o=oo; expires=Aug 2009 UTC; path=/’ }
if (document.cookie=’o=oo’){
document.getElementById(“kie”).innerHTML = kie[counter];
counter++; if (counter == kie.length)
{counter = 1; } alert(document.cookie); setTimeout(‘getkie()’, 9000); document.cookie = ‘o=o; expires=Aug 2009 UTC; path=/’ }}