How to add ajax into joomla? - Joomla! Forum - community, help and support


i put in javascript

code: select all

function ajax()
{
   var xmlhttp;
   try
   {   
      xmlhttp=new xmlhttprequest();// firefox, opera 8.0+, safari
   }
   catch (e)
   {
      try
      {
         xmlhttp=new activexobject("msxml2.xmlhttp"); // internet explorer
      }
      catch (e)
      {
         try
         {
            xmlhttp=new activexobject("microsoft.xmlhttp");
         }
         catch (e)
         {
            alert("no ajax!?");
            return false;
         }
      }
   }

   xmlhttp.onreadystatechange=function()
   {
      if(xmlhttp.readystate==4)
      {
         document.getelementbyid('reloadthis').innerhtml=xmlhttp.responsetext;
         settimeout('ajax()',500);
      }
   }

   window.onload=function()
   {
      settimeout('ajax()',500);
   }
}


i put in tmpl file

code: select all

<div id="reloadthis">
...
</div>


it never refresh... tried use php file, cant work. copied code internet. how make working?






Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい