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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.