JavaScript - Stop This Script From Reseting Everytime Page Is Reloaded
Hello there
I've been searching and searching but couldn't make this script stop reseting after reloading the page. The scripts counts down some timers every x hours but the problem is that each time the page is reloaded the timer resets. Could anyone help me here how to keep the countdown going even if i reload page? thanks in advance I call the timers with. Example Timer 8: >div... etc id="timeLeft8" Code: <script type="text/javascript"> var events = new Array(); events[1]={name: 'Blood Castle:', startUp: new Array( {hour:0,minute:25}, {hour:2,minute:25}, {hour:4,minute:25}, {hour:6,minute:25}, {hour:8,minute:25}, {hour:10,minute:25}, {hour:12,minute:25}, {hour:14,minute:25}, {hour:16,minute:25}, {hour:18,minute:25}, {hour:20,minute:25}, {hour:22,minute:25} )} events[2]={name: 'Devil Squa ', startUp: new Array( {hour:1,minute:55}, {hour:3,minute:55}, {hour:5,minute:55}, {hour:7,minute:55}, {hour:9,minute:55}, {hour:11,minute:55}, {hour:13,minute:55}, {hour:15,minute:55}, {hour:17,minute:55}, {hour:19,minute:55}, {hour:21,minute:55}, {hour:23,minute:55} )} events[3]={name: 'Chaos Castle:', startUp: new Array( {hour:0,minute:55}, {hour:2,minute:55}, {hour:4,minute:55}, {hour:6,minute:55}, {hour:8,minute:55}, {hour:10,minute:55}, {hour:12,minute:55}, {hour:14,minute:55}, {hour:16,minute:55}, {hour:18,minute:55}, {hour:20,minute:55}, {hour:22,minute:55} )} events[4]={name: 'Red Dragon:', startUp: new Array( {hour:0,minute:0}, {hour:2,minute:0}, {hour:4,minute:0}, {hour:6,minute:0}, {hour:8,minute:0}, {hour:10,minute:0}, {hour:12,minute:0}, {hour:14,minute:0}, {hour:16,minute:0}, {hour:18,minute:0}, {hour:20,minute:0}, {hour:22,minute:0} )} events[5]={name: 'Gold Invasion:', startUp: new Array( {hour:0,minute:0}, {hour:2,minute:0}, {hour:4,minute:0}, {hour:6,minute:0}, {hour:8,minute:0}, {hour:10,minute:0}, {hour:12,minute:0}, {hour:14,minute:0}, {hour:16,minute:0}, {hour:18,minute:0}, {hour:20,minute:0}, {hour:22,minute:0} )} events[6]={name: 'White Wizard:', startUp: new Array( {hour:0,minute:0}, {hour:2,minute:0}, {hour:4,minute:0}, {hour:6,minute:0}, {hour:8,minute:0}, {hour:10,minute:0}, {hour:12,minute:0}, {hour:14,minute:0}, {hour:16,minute:0}, {hour:18,minute:0}, {hour:20,minute:0}, {hour:22,minute:0} )} events[7]={name: 'Blue:', startUp: new Array( {hour:0,minute:40}, {hour:1,minute:40}, {hour:2,minute:40}, {hour:3,minute:40}, {hour:4,minute:40}, {hour:5,minute:40}, {hour:6,minute:40}, {hour:7,minute:40}, {hour:8,minute:40}, {hour:9,minute:40}, {hour:10,minute:40}, {hour:11,minute:40}, {hour:12,minute:40}, {hour:13,minute:40}, {hour:14,minute:40}, {hour:15,minute:40}, {hour:16,minute:40}, {hour:17,minute:40}, {hour:18,minute:40}, {hour:19,minute:40}, {hour:20,minute:40}, {hour:21,minute:40}, {hour:22,minute:40}, {hour:23,minute:40}, {hour:24,minute:40} )} events[7]={name: 'Hide&Seek:', startUp: new Array( {hour:0,minute:42}, {hour:1,minute:22}, {hour:2,minute:32}, {hour:3,minute:42}, {hour:4,minute:52}, {hour:6,minute:02}, {hour:7,minute:12}, {hour:8,minute:22}, {hour:9,minute:32}, {hour:10,minute:42}, {hour:11,minute:52}, {hour:13,minute:02}, {hour:14,minute:12}, {hour:15,minute:22}, {hour:16,minute:32}, {hour:17,minute:42}, {hour:18,minute:52}, {hour:20,minute:02}, {hour:21,minute:12}, {hour:22,minute:22}, {hour:23,minute:32} )} events[8]={name: 'Sky:', startUp: new Array( {hour:1,minute:5}, {hour:4,minute:5}, {hour:7,minute:5}, {hour:10,minute:5}, {hour:13,minute:5}, {hour:16,minute:5}, {hour:19,minute:5}, {hour:23,minute:5} )} events[9]={name: 'Boss Attack:', startUp: new Array( {hour:1,minute:50}, {hour:4,minute:50}, {hour:7,minute:50}, {hour:10,minute:50}, {hour:13,minute:50}, {hour:16,minute:50}, {hour:23,minute:50} )} events[10]={name: 'Happy Hour:', startUp: new Array( {hour:5,minute:5}, {hour:2,minute:5}, {hour:8,minute:5}, {hour:11,minute:5}, {hour:14,minute:5}, {hour:17,minute:5}, {hour:20,minute:5}, {hour:0,minute:5} )} events[11]={name: 'Hit and Up:', startUp: new Array( {hour:0,minute:20}, {hour:2,minute:20}, {hour:5,minute:20}, {hour:8,minute:20}, {hour:11,minute:20}, {hour:14,minute:20}, {hour:20,minute:20} )} events[12]={name: 'Raklion:', startUp: new Array( {hour:0,minute:15}, {hour:3,minute:15}, {hour:6,minute:15}, {hour:9,minute:15}, {hour:12,minute:15}, {hour:15,minute:15}, {hour:18,minute:15}, {hour:21,minute:15} )} events[13]={name: 'Moss:', startUp: new Array( {hour:3,minute:35}, {hour:7,minute:35}, {hour:11,minute:35}, {hour:15,minute:35}, {hour:19,minute:35}, {hour:23,minute:35} )} events[14]={name: 'Illusion Temple:', startUp: new Array( {hour:0,minute:25}, {hour:1,minute:25}, {hour:2,minute:25}, {hour:3,minute:25}, {hour:4,minute:25}, {hour:5,minute:25}, {hour:6,minute:25}, {hour:7,minute:25}, {hour:8,minute:25}, {hour:9,minute:25}, {hour:10,minute:25}, {hour:11,minute:25}, {hour:12,minute:25}, {hour:13,minute:25}, {hour:14,minute:25}, {hour:15,minute:25}, {hour:16,minute:25}, {hour:17,minute:25}, {hour:18,minute:25}, {hour:19,minute:25}, {hour:20,minute:25}, {hour:21,minute:25}, {hour:22,minute:25}, {hour:23,minute:25}, {hour:24,minute:25} )} events[15]={name: 'Castle Deep:', startUp: new Array( {hour:1,minute:25}, {hour:7,minute:25}, {hour:13,minute:25}, {hour:19,minute:25} )} events[16]={name: 'CryWolf:', startUp: new Array( {hour:1,minute:45}, {hour:4,minute:45}, {hour:7,minute:45}, {hour:10,minute:45}, {hour:13,minute:45}, {hour:16,minute:20}, {hour:19,minute:45}, {hour:22,minute:45} )} var curTime=1336998502 var dateTime=1336953600 function timeLeft(i){ for(j in events[i].startUp){ tmp=events[i].startUp[j].hour*3600+events[i].startUp[j].minute*60 if(dateTime+tmp>curTime){ return dateTime+tmp-curTime; } } tmp=events[i].startUp[0].hour*3600+events[i].startUp[0].minute*60 return dateTime+86400+tmp-curTime; } function getFormatedLeftTime($seconds){ $second = $seconds % 60; $minutes = parseInt(($seconds / 60) % 60); $hour = parseInt(($seconds / 3600) % 24); $days = parseInt($seconds / (24 * 3600)); $ret = ''; if ($days > 0) if ($days == 1) $ret += '1 day '; else $ret += $days + ' days '; if ($hour > 0){ if ($hour < 10) $hour = '0' + $hour; $ret += $hour + ':'; }else if ($days > 0) $ret += '00:'; if($minutes < 10) $minutes = '0' + $minutes; $ret += $minutes + ':'; if ($second < 10) $second = '0' + $second; $ret += $second; return $ret; } function updateTimes(){ curTime++; for (i in events){ document.getElementById("timeLeft"+i).innerHTML=getFormatedLeftTime(timeLeft(i)); } } for(i in events) document.getElementById("eventList").innerHTML+="<div style='float:right; color: #FFFF00;' id='timeLeft"+i+"'>"+getFormatedLeftTime(timeLeft(i))+"</div><div style=\"color: #00FFFF;\"><strong>"+events[i].name+"</strong></div>"; setInterval("updateTimes()", 1000); </script> Similar TutorialsHi, I have mutiple dropdowns in my HTML table in one of the columns.The dropdowns have three values 'Blank','Approve' and 'Reject'.What I want is when user changes the values in any of the dropdown,It will ask for the confirmation from user.If user click OK ,it will change the value in dropdown and calls another function else it will be reset to previous value.e.g, Suppose previous value is 'Reject' and user tries to change it to 'Approve'.When confirm window comes up and user clicks cancel it will reset to Reject.On OK it will change to 'Approve'. How can I handle this in Javascript? Please help. Thanks, Anil This code was working fine until I added "["lastname"]["email"]" to it. Why has this problem developed? Was I suppose to separate them or something? Code: <SCRIPT type="text/javascript"> function validateForm() { var x=document.forms["form"]["firstname"]["lastname"]["email"].value; if (x=="") { alert ("Fields required for submission have not been filled."); return false; } } </SCRIPT> <FORM action="action.php" method="post" name="form" onsubmit="return validateForm()"> <INPUT name="firstname" type="text"> <BR> <INPUT name="lastname" type="text"> <BR> <INPUT name="email" type="text"> <BR> <INPUT class="submit" type="submit" value="Submit"> </FORM> Hi, I'm using HTA with iframes contains external web pages, lot of pages (external - not mine) contains errors and while running 'script error' pops. If running the same pages in IE there are only error notice in the bottom left side of the browser. Can I do something to ignore those script error popups in my HTA? (I'm using also Javascript for my HTA) Could I use javascript code to stop Internet Explorer script error messages? Regards Bob Hi, Could I use javascript code to stop Internet Explorer script error messages? Bob Kuspe Is there anyway to stop the page 'jumping to the top' when using a link like the below? Code: <a href="#" onClick="arrangeCards();">blah</a> .. I just want it to stay in the same position on the page & not jump to the top of the page every time a link like that is clicked. Cheers! Hi, I am using javascript function for refreshing html page. I have used [window.location.reload(true);] method to reload page from server. This code works if i use it by using Link/button etc. For Example: <input type="button" value="Refresh" onclick="window.location.reload(true);" /> But i want to refresh page when page loads. For Example: <body onload = "window.location.reload(true);> But this time, page reloads in an infinite loop. i don't know why... I have also used following function (against body onLoad) to reload and then stop, but this also does'nt work. function doLoad(){ var timeoutId = setTimeout( window.location.reload(true), 1000 ); window.clearTimeout(timeoutID); } Is there a way to stop reloading page after one refresh ? Thanks... when i click on submit button, all the data in form will be inserted into my db. but when i click on refresh the form will be submitted again .. how can i prevent this?
I'm attaching my php test file but this is a JS problem. When I scroll down in the web page and the meta refresh hits, in Windows Safari and IE6/7/8 browsers, the web page re-positions back to the top. In Opera and FF the page refreshes but it stays where it is. Can someone look at my test script and see why it is not working in IE and Win Safari? My goal is to have the web page not re-position to the top on the auto refresh. Thanks... hi everyone, Here's part of the codes I got from our website. Right now, when someone wants to register on our website, they have to put into the Captcha after they finish all the other information. If the captcha is empty, there would be an alert; if it's wrong, the page would be refreshed, and there would be another alert, and at the same time, all the information would be lost and they have to fill them again. Now the question is, how can I stop the page refreshing itself? All I need is an alert and then you could retype the captcha without losing the other information. Thank you in advance for your advice! <script type="text/javascript"> function ltrim(stringToTrim) { return stringToTrim.replace(/^\s+/,""); } function validateForm() { var okSoFar=true with (document.practitioner_profile) { if (firstname.value=="" && okSoFar) { okSoFar=false alert("Please enter your first name.") firstname.focus() } if (lastname.value=="" && okSoFar) { okSoFar=false alert("Please enter your last name.") lastname.focus() } //some other things here... if (verify_code.value=="" && okSoFar) { okSoFar=false alert("Please enter your security code.") verify_code.focus() } if (okSoFar==true) submit(); } } //here's the submit button in the html code, <div class="practsubmit"> <div class="signupform"><h4>* Security Code:</h4> <p>Please type in what you see in the box below and press submit. Characters are case-sensitive.</p></div> <div class="signupform"><img id="captcha" src="index.php?option=com_egbcaptcha&width=150&height=50&characters=5" /><br /><input id="verify_code" name="verify_code" type="text" /></div> <input type="button" class="button" value="Send" name="B1" ONCLICK="javascript:validateForm()"> <input type="reset" class="button" value="Clear" name="clear"> </div> I have a set of tabs that are set with an href that adds a query string to the url such as "?t=1", meaning the first tab is selected. Technically it works just fine but every time I click a tab it reloads the page and I'm not entirely sure how to stop this. I'm using a jquery plugin to handle the query strings. Here's the plugin. Here's the piece of the code that matters: Code: var url = location.search; var tab = $.query.get('t'); init(tab); function init(tab){ $("div.tab").hide(); //hides all the content boxes related to the tabs $("div#tab"+tab).fadeIn("fast"); //Shows the selected tab's content box setInactive(); //Styles unselected tabs setActive(tab); //Styles selected tab } Any help would be greatly appreciated. Probably a stupid noob question, is there any way I can stop document.write from outputting info to a new page I would prefer to have it shown in a textarea. Info from an array that is suppose to display in a text area when button is clicked and when another button is clicked it is suppose to show some other info. But what happens is the first info displays in textarea for a few seconds and then the second info is displayed but on a new page and not the textarea where I want it to go I have marked code within the code // I want this specific code to be displayed second but I know its in the wrong spot. Here is the code [CODE] function show() { var myArray = new Array(); myArray[0] = document.getElementById('fullname').value; ' myArray[1] = document.getElementById('address').value; myArray[2] = document.getElementById('phone').value; myArray[3] = document.getElementById('email').value; //Code I want to display second in the textarea //var string = myArray.join("\n") //document.getElementById('textarea').value = string; document.writeln('Thank you for registering,' + ' ' + myArray[0] + '. Your membership will be confirmed by E-mail to ' + myArray[2] + "<br>"); document.writeln('Registration Details:') document.writeln("<br>") for (var i=0; i<myArray.length; i++) { document.write(myArray[i] + "<br>"); } } [\CODE] Thanks in advance Hi all: I've got a script that reads a line of text from a file, and does a bit of parsing to that line into an array. Apparently, this can take some time, so I get the "Stop running this script?" message. From what I understand, I need to use the setTimeout call, but for the life of me can't understand it. When I do add it to some code, it seems to work, but doesn't "pause" the code as I expect it too... Code: function ReadFile(Fname) { var path = "y:\\metrics\\"; var file, x=0, ForReading=1; file = fso.OpenTextFile(path+Fname, ForReading, false); do { var fileLine = file.readline(); var arrSplit = GetItems(fileLine); } while (!file.AtEndOfStream); file.close(); return(x); } function GetItems(recordLine) { var ItemsTemp=[]; var finishString, itemString, itemIndex, charIndex, inQuote, testChar; inQuote = false; charIndex= 0; itemIndex=0; itemString = ""; finishString = false; var count = 0; do { if (++count >= 100) { delay = setTimeout("", 1, []); count = 0; return; } testChar = recordLine.substring(charIndex,charIndex+1); finishString = false; if (inQuote) { if (testChar == "\"") { inQuote = false; finishString = true; ++charIndex; } else { itemString = itemString + testChar; } } else { if (testChar == "\"") { inQuote = true; } else if (testChar == ",") { finishString = true; } else { if (testChar == "=") { testChar = ""; } itemString = itemString + testChar; } } if (finishString) { ItemsTemp.push(itemString); itemString = ""; ++itemIndex; } ++charIndex; } while (charIndex <= recordLine.length); return(ItemsTemp); } Any help would be greatly appreciated! Thanks, Max I type something on the current textarea/input and all the values get removed after I add another field. Is there a solution? Code: <script language="Javascript" type="text/javascript"> <!-- //Add more fields dynamically. function addField(area,field,limit) { if(!document.getElementById) return; //Prevent older browsers from getting any further. var field_area = document.getElementById(area); var all_inputs = field_area.getElementsByTagName("input"); //Get all the input fields in the given area. //Find the count of the last element of the list. It will be in the format '<field><number>'. If the // field given in the argument is 'friend_' the last id will be 'friend_4'. var last_item = all_inputs.length - 1; var last = all_inputs[last_item].id; var count = Number(last.split("_")[1]) + 1; //If the maximum number of elements have been reached, exit the function. // If the given limit is lower than 0, infinite number of fields can be created. if(count > limit && limit > 0) return; //Older Method field_area.innerHTML += "<li><textarea id='steps' name='steps[]' rows='5' cols='40'></textarea><br /><input id='steps_image' name='steps_image[]' /></li>"; } //--> </script> <ol id="steps_area"><li> <textarea id='steps' name='steps[]' rows='5' cols='40'></textarea><br /><input id='steps_image' name='steps_image[]' /> </li> </ol> <input type="button" value="Add" onclick="addField('steps_area','',15);"/> I would like to know a script for when you have a page that can expire (or cannot be open again) --- a time limit for like 24 hours. Because I'm going to make a site where people can buy website designs, they buy it off paypal, they get redirected to a site where the code is located and the site will get expired in 24 hours -- then, they wouldn't be able to open the page again. If anyone knows the script, please post it here! Thank you x I need some help finding a "find on page" script that will display the results in the middle of the page for IE. I have tried several different ones to no avail. The ones that work in all the browsers display the result in IE at the very bottom of the page. I am not very familiar with programing in Java and I am unable to modify any for my needs. The one I found that did work in IE didn't work in any other browsers. Please help, Thx
I am using the general js facebook script. I am only using it on 2 home pages, but it is making the page not sit right. www.seniors260.org both club and venue. Can anyone help please? I do not know anything much about JS WILL MOVE THIS PAGE TO CSS Is there a way to make a script that edits something on a different page.
Hey: I have two javascripts on my page but one isn't showing with both codes in page. [CODE]<script type="text/javascript" src="js/image-slideshow.js"></script>[ICODE] The above code is for the image slide. When this is in the html the other one doesn't work (a text changer). The wbesite is http://www.uwics.com/constitution.htm There is no text at the top of the page currently. If you check Home you'll see how it should be. Any help would be greatly appreciated. Thank you, Mitka Hey every1. Im a web design student who is trying to make my first webpage for a school project. my problem: I have 2 javascripts i would like to run smooth on my page, but they wont. I have read the info about using the <body onload="dothis()"; "dothat()"> but my problem is the way the 1 javascript is made. i believe so that is. First script: A matrix look-a-like screen for a link. Code: <script type="text/javascript"> // <![CDATA[ var height=9; // height of the effect in rows - must be an odd number var speed=66; // lower is faster var reveal=99; // between 0 and 100 // the higher, the faster the word is 'decoded' var repeat=10; // if '0' the script does not repeat // if set to a number this is the delay until the script repeats var alink="http://www.noma.nu"; // place to link to // set to alink="" if not needed /***************************\ * The Matrix JavaScripted.. * *(c) 2003-6 mf2fm web-design* * http://www.mf2fm.com/rv * * DON'T EDIT BELOW THIS BOX * \***************************/ var timer, table, x, y, columns, ma_txt, ma_cho; reveal/=100; var m_coch=new Array(); var m_copo=new Array(); window.onload=function() This is part im having troubles with. If i do as your toturial tells me i should put Function() down in the body onload command. But it wont work. { if (document.getElementById) { var matrix, tbody, tr, td; matrix=document.getElementById("matrix"); ma_txt=matrix.firstChild.nodeValue; ma_txt=" "+ma_txt+" "; columns=ma_txt.length; while (matrix.childNodes.length) matrix.removeChild(matrix.childNodes[0]); table=document.createElement("table"); table.cellSpacing=0; table.style.margin="auto"; table.style.width="auto"; table.style.border="none"; tbody=document.createElement("tbody"); for (x=0; x<height; x++) { tr=document.createElement("tr"); for (y=0; y<columns; y++) { td=document.createElement("td"); td.className="matrix"; td.appendChild(document.createTextNode(String.fromCharCode(160))); tr.appendChild(td); } tbody.appendChild(tr); } table.appendChild(tbody); matrix.appendChild(table); ma_cho=ma_txt; for (x=0; x<columns; x++) { m_copo[x]=0; ma_cho+=String.fromCharCode(32+Math.floor(Math.random()*94)); } x=0; timer=setInterval("mytricks()", speed); }} function mytricks() { var mtmp, mrow; var z=x; x=0; for (y=0; y<columns; y++) { x=x+(m_copo[y]==100); mrow=m_copo[y]%100; if (mrow && m_copo[y]<100) { if (mrow<height+1) { mtmp=table.rows[mrow-1].cells[y]; mtmp.firstChild.nodeValue=m_coch[y]; mtmp.style.color="#33ff66"; mtmp.style.fontWeight="bold"; } if (mrow>1 && mrow<height+2) { mtmp=table.rows[mrow-2].cells[y]; mtmp.style.fontWeight="normal"; mtmp.style.color="#00ff00"; } if (mrow>2) table.rows[mrow-3].cells[y].style.color="#009900"; if (mrow<Math.floor(height/2)+1) m_copo[y]++; else if (mrow==Math.floor(height/2)+1 && m_coch[y]==ma_txt.charAt(y)) zoomer(y); else if (mrow<height+2) m_copo[y]++; else if (m_copo[y]<100) m_copo[y]=0; } else if (Math.random()>0.9 && m_copo[y]<100) { if (reveal>Math.random() && (z+1)/columns>Math.random()) m_coch[y]=ma_cho.charAt(y); else m_coch[y]=ma_cho.charAt(Math.floor(Math.random()*ma_cho.length)); m_copo[y]++; } } if (x==columns) { if (repeat) { ma_cho=ma_txt; for (x=0; x<columns; x++) { m_copo[x]=0; ma_cho+=String.fromCharCode(32+Math.floor(Math.random()*94)); } } else clearInterval(timer); } } function zoomer(ycol) { var mtmp, mtem, ytmp; if (m_copo[ycol]==Math.floor(height/2)+1) { for (ytmp=0; ytmp<height; ytmp++) { mtmp=table.rows[ytmp].cells[ycol]; mtmp.firstChild.nodeValue=m_coch[ycol]; mtmp.style.color="#33ff66"; mtmp.style.fontWeight="bold"; if (alink) { mtmp.style.cursor="pointer"; mtmp.onclick=function() {window.location.href=alink}; } } mtmp=ma_cho.indexOf(ma_txt.charAt(ycol)); m_copo[ycol]+=199; setTimeout("zoomer("+ycol+")", speed); } else if (m_copo[ycol]>200) { mtmp=table.rows[m_copo[ycol]-201].cells[ycol]; mtem=table.rows[200+height-m_copo[ycol]].cells[ycol]; m_copo[ycol]-=1; mtmp.style.fontWeight="normal"; mtem.style.fontWeight="normal"; setTimeout("zoomer("+ycol+")", speed); } else if (m_copo[ycol]==200) m_copo[ycol]=100+Math.floor(height/2); if (m_copo[ycol]>100 && m_copo[ycol]<200) { mtmp=table.rows[m_copo[ycol]-101].cells[ycol]; mtmp.firstChild.nodeValue=String.fromCharCode(160); mtem=table.rows[100+height-m_copo[ycol]].cells[ycol]; mtem.firstChild.nodeValue=String.fromCharCode(160); m_copo[ycol]-=1; setTimeout("zoomer("+ycol+")", speed); } } // ]]> </script> Second script: a simple digital clock. Code: <script type="text/javascript"> function showClock() { // create a new Date() object var currentTime=new Date(); var hours=currentTime.getHours(); var minutes=currentTime.getMinutes(); var seconds=currentTime.getSeconds(); var area=currentTime.getTimezoneOffset(); area=area/60; var clock=hours; // add a zero in front of numbers<10 if (minutes<10){ minutes="0" + minutes; } if (seconds<10){ seconds="0" + seconds; } document.getElementById('clock').innerHTML="<table><tr><td width=80 align=center>"+clock+":"+minutes+":"+seconds+"</td>" +"" +""; t=setTimeout('showClock()',500); // setTimeout calls showClock() function every 500 miliseconds, that means 0.5 seconds } </script> <body onload="showclock()"> this is where the clock load. It works fine. how do i get the other script to load with this. I can get them both to run but not at same time. Any1 outthere who have a solution. I believe it has something to do with Function() part in the matrix code. can i change that do another command? Hello, I'm working on a page navigation script and i'm stuck at a part. I have made a little picture gallery script and my team partners can fill in how many folders they want to show on a page. So example i have 5 folders and want to show 2 folders per page i tried to use code like this var totalFolderPages = 1; if ((parseInt(pageCounter) / parseInt(totalFoldersPerPage) % 1 == 0)) { totalFolderPages++; } I'm still a bit new in coding and don't know how i can create a working solution for my page navigation. Some help would be great |