Jump to content

magicadmin

Members
  • Posts

    17
  • Joined

  • Last visited

About magicadmin

  • Birthday 04/26/1973

Contact Methods

  • Website URL
    http://www.magic8ball.co.uk
  • ICQ
    0

magicadmin's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. The wipegraffitiwall() code is=// Wipe wall refresh function.function wipegraffitiwall() { rfsh = new Date(); rfsh = "?"+rfsh.getTime() document.images["graffitiwall"].src = "<?php echo $graffiti_image; ?>?"+rfsh toggleLayer('hiddenLayerLoad');} It makes an image with the url in it lol...But it dose wipe the wall clean like its ment to.The problem is not all the time its only some times..Try itGraffiti Wall link
  2. Done that but i still have the same problem
  3. Hi all,I want to send some info from a form to a php page without reloading the page,I have tried some AJAX but its not 100% right, it works some of the time but some times its crashing out my server, it make my CPU run at 100% so i think there is a big bug in it. var xmlHttpfunction clearwall(){var url="./includes/graffiti.php?painttext=&adminreset=1&userwallwiped=1"xmlHttp=GetXmlHttpObject(wallstateChanged)xmlHttp.open("POST", url , true)xmlHttp.send(null)} function wallstateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ wipegraffitiwall()} } function GetXmlHttpObject(handler){ var objXmlHttp=nullif (navigator.userAgent.indexOf("MSIE")>=0){ var strName="Msxml2.XMLHTTP"if (navigator.appVersion.indexOf("MSIE 5.5")>=0){strName="Microsoft.XMLHTTP"} try{ objXmlHttp=new ActiveXObject(strName)objXmlHttp.onreadystatechange=handler return objXmlHttp} catch(e){ alert("Error. Scripting for ActiveX might be disabled") return } } if (navigator.userAgent.indexOf("Mozilla")>=0){objXmlHttp=new XMLHttpRequest()objXmlHttp.onload=handlerobjXmlHttp.onerror=handler return objXmlHttp}} Dose any one know how to do this or whats up with my ajax??Thanks all
  4. Hi all,I'm trying to restart the countdown when the refresh part of the script works...refresh part... function refreshgraffiti() { rfsh = new Date(); rfsh = "?"+rfsh.getTime() document.images["graffitiwall"].src = "<?php echo $graffiti_image; ?>?"+rfsh setTimeout("refreshgraffiti()", 20*1000) display()} Countdown part... <form name="countdown" action=""><input type="text" size="1" name="CountDown" title="Time Till Next Auto Wall Reload" alt="Time Till Next Auto Wall Reload" /></form> <script type="text/javascript"> var milisec=0 var seconds=20 document.countdown.CountDown.value='0.0' function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.countdown.CountDown.value=seconds+"."+milisec setTimeout("display()",100) } </script> What am i miss here ?? a little lost with it....Thanks
  5. Any more input any one ???Im so lost...
  6. Thanks scott, but by the looks of that code it still would not rememmber the last thing that was opened... its not a menu im doing.. its my admin panel...Im so lost with this javascript stuff
  7. I need it to remmember what the last menu that was used on page refresh. I would not know where to begin to do that... im so new to javascript.Thanks
  8. Right i have this working sort of.. but when i refresh the page it opens the menu then it closes it again once its been closed plus i would like it to have all of it closed when the page is first loaded??? <script type="text/javascript"> function init() { var cookie = getCookie('collapse_obj'); if(cookie) { var values = cookie.split(','); for(var i = 0; i < values.length; i++) { var itm = getItem(values[i]); if(itm) itm.style.display = 'none'; } } } function makeCookie(name, value) { var cookie = name + '=' + escape(value) + ';'; document.cookie = cookie; } function getCookie(name) { if(document.cookie == '') return false; var firstPos; var lastPos; var cookie = document.cookie; firstPos = cookie.indexOf(name); if(firstPos != -1) { firstPos += name.length + 1; lastPos = cookie.indexOf(';', firstPos); if(lastPos == -1) lastPos = cookie.length; return unescape(cookie.substring(firstPos, lastPos)); } else return false; } function getItem(id) { var itm = false; if(document.getElementById) itm = document.getElementById(id); else if(document.all) itm = document.all[id]; else if(document.layers) itm = document.layers[id]; return itm; } function toggleItem(id) { itm = getItem(id); if(!itm) return false; if(itm.style.display == 'none') itm.style.display = ''; else itm.style.display = 'none'; //////////////////// cookie = getCookie('collapse_obj'); values = new Array(); newval = new Array(); add = 1; if(cookie) { values = cookie.split(','); for(var i = 0; i < values.length; i++) { if(values[i] == id) add = 0; else newval[newval.length] = values[i]; } } if(add) newval[newval.length] = id; makeCookie('collapse_obj', newval.join(',')); return false; } </script><body onload="init()"><div id="nav"> tables here</div><a href="#" onclick="java script:toggleItem('nav')">Show/hide Navgation</a> also i want to use 2 different images one for when its open and one for when its closed <a href="#" onclick="java script:toggleItem('main')"><img src="./images/up.gif" border="0"></a> <a href="#" onclick="java script:toggleItem('main')"><img src="./images/down.gif" border="0"></a> How do i get this to check if the window is up or down and the display the right one ???And anther thought... how can i have it so only one menu is open at one time... IE when one is opened the other closes????Thanks
  9. Its diffrent from the one i have.....
  10. I was just looking at the site and this ajax i used dose not seem to be on here no more???
  11. Cool, but i did mean the one im having problems with...ie this one.ajax link
  12. Who made the ajax in the first place ?
  13. No one got any idea on how i can fix this ajax problem then?I really need it sorted asap...Please please please can some one help me.....I have been trying for a couple of weeks now but i really dont know how to sort it.
  14. But if some one has popup blocker on like most of us do it will now work
  15. Ok sorry... its not w3c i got the ajax from its this site lolajax link
×
×
  • Create New...