Jump to content

Unknown runtime error


448191

Recommended Posts

[code]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;
        }
    }
}[/code]

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

Anyone?

Link to comment
https://forums.phpfreaks.com/topic/10284-unknown-runtime-error/
Share on other sites

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\" /]
Link to comment
https://forums.phpfreaks.com/topic/10284-unknown-runtime-error/#findComment-38794
Share on other sites

  • 2 weeks later...
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 = [b]"[/b]some text[b]"[/b];[/quote]
you know,, missing comas could make an error,...
Link to comment
https://forums.phpfreaks.com/topic/10284-unknown-runtime-error/#findComment-41211
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.