Jump to content


Photo

Unknown runtime error


  • Please log in to reply
3 replies to this topic

#1 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 23 May 2006 - 05:42 PM

function getRequestObject()
{
    var http; 
    if(window.XMLHttpRequest) { 
        http = new XMLHttpRequest(); 
    } 
        else if(window.ActiveXObject) { 
        http = new ActiveXObject("Microsoft.XMLHTTP"); 
    }
        else { 
        alert('Problem creating the XMLHttpRequest object'); 
    }
    return http;
}
var currentNode;
var currentModule;
var http = getRequestObject();

function loadModules()
{    
    var moduleNodeList = document.getElementsByTagName("module");
    for($i=0;$i<moduleNodeList.length; $i++) 
    {
        currentNode = moduleNodeList.item($i);
        currentModule = currentNode.getAttribute('id');
        var url = 'shout.php?module='+currentModule;
        http.open('get',url,false); 
        http.onreadystatechange = processResponse; 
        http.send(null);
    }    
}
function processResponse() 
{
    if(http.readyState == 4 && http.status == 200) {
        var response = http.responseText; 
        if(response) { 
            currentNode.innerHTML = response;
        }
    }
}

Above causes an unknown runtime error within processRespone on "currentNode.innerHTML = response;"

Anyone?



#2 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 25 May 2006 - 06:37 AM

Nevermind. I can't get an xhtml document with a tag "module" to validate, even with custom namespacing. So I'm going for the cutting edge and going to learn XSLT... [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

#3 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 25 May 2006 - 07:59 AM

Pfffff, this XLST shit is though... [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /]

#4 GBS

GBS
  • Members
  • PipPipPip
  • Advanced Member
  • 108 posts

Posted 02 June 2006 - 03:42 PM

Hi there,,

just a little idea,,
In your script, the response you get,,... does it look like:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]currentNode.innerHTML = some text;[/quote]
or like:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]currentNode.innerHTML = "some text";[/quote]
you know,, missing comas could make an error,...
Sorry for my english,... I do my best, but sometimes,...
1st intention: understand the problem
2nd intention: try to solve it
3rd intention: try to understand how to solve it :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users