Hello, how do I accomodate for more than one script in the same page for the onload? I know how to change the ids everywhere except here. Because the divs have an id and so the onloads need to go into separate divs as well??? Puzzled. Please someone help. Thank you very much.
window.onload=function(){html('html_id1');html2('html_id2');} Code (markup): Do NOT use more than one set of script tags in the HEAD. Put the above as the last line in the script section of the HEAD. function html(nID){ ..... var nImg = document.getElementById(nId).innerHTML = arr[index][0]; // you do not need to surround the above with parens // img is an HTML reserved word, don't use it for a variable name // precede variables with var Code (markup): Should be like this: function html(nID){ var index = ""; if(Orderrand) { index = Math.floor(Math.random() * arr.length); } else { index = go('rotate_html'); index = index ? index : 0; index = ++index % arr.length; } var nImg = document.getElementById('html_id').innerHTML = arr[index][0]; cookie('rotate_html', index, 365); } Code (markup):