Jump to content

Archived

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

448191

Unknown runtime error

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?

Share this post


Link to post
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\" /]

Share this post


Link to post
Share on other sites
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\" /]

Share this post


Link to post
Share on other sites
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,...

Share this post


Link to post
Share on other sites

×

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.