doablesandman Posted June 12, 2006 Share Posted June 12, 2006 (edited) WPI v5.0added the code below under the part on the bottom bar where it says "WPI Version X"and now it doesn't load my programs up in the middle. If I remove the below code they come back... why is this code (it puts the current time in text) making a problem? and anyone know how I can fix it? TIA!EDIT: btw- this is in the file wpi.htm in the theme folder (Glossy)<span id=tod></span> <script>function showtod(){if (!document.all&&!document.getElementById)returnthelement=document.getElementById? document.getElementById("tod"): document.all.todvar todDisplay=new Date()var hours=todDisplay.getHours()var minutes=todDisplay.getMinutes()var seconds=todDisplay.getSeconds()var ampm="PM"if (hours<12)ampm="AM"if (hours>12)hours=hours-12if (hours==0)hours=12if (minutes<=9)minutes="0"+minutesif (seconds<=9)seconds="0"+secondsvar ctime=hours+":"+minutes+":"+seconds+" "+ampmthelement.innerHTML="<b style='font-size:14;color:black;'>"+ctime+"</b>"setTimeout("showtod()",1000)}window.onload=showtod//--></script> Edited June 12, 2006 by doablesandman Link to comment Share on other sites More sharing options...
sadicq Posted June 12, 2006 Share Posted June 12, 2006 (edited) Hehe, there's a small mistake in your script.Instead ofwindow.onload=showtodPutwindow.onload=showtod() Edited June 12, 2006 by sadicq Link to comment Share on other sites More sharing options...
doablesandman Posted June 12, 2006 Author Share Posted June 12, 2006 thanks! that did it, I can't believe I didn't see that! Guess my professor was right when he said "After you finish make sure you have a second pair of eyes look at it before you turn it in." Link to comment Share on other sites More sharing options...
mritter Posted June 12, 2006 Share Posted June 12, 2006 And you don't need to do any extra browser compatibility checks since WPI only runs on IE/mshta, and JS is turned on by default when do a clean install. Link to comment Share on other sites More sharing options...
doablesandman Posted June 13, 2006 Author Share Posted June 13, 2006 yea or I'd have to have a script run at T-12 or on first boot that enabled it...yea for JS...now to write an AJAX installer Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now