views:

22

answers:

0

I have this JS which gets a XML response from a service, its a True or a False, well the script should catch the submit and get the response from the service. The problem is that I see that its not working because when I do the submit, I see the XML response on IE (6/7/8), when the script should have catched it and validated the XML response.

<div id="eventForm" style="display:none;">
    Event.observe('formDataPersonal', 'submit', function(event) {
    $('formDataPersonal').request({
        onSuccess: function(t) {
            var xml  = t.responseXML.documentElement;
            var stateNode = '';
            var msgNode = '';
            if (navigator.appName == "Microsoft Internet Explorer"){
                stateNode = xml.childNodes[0].nodeValue.toLowerCase();
                msgNode = xml.childNodes[1].nodeValue;
            }else{
                stateNode = xml.childNodes[0].textContent.toLowerCase();
                msgNode = xml.childNodes[1].textContent;
            }
            if (stateNode == 'true'){
                $('transparentDiv').style.display='none';
                $('popup').style.display='none';
                validateIntegrationPopup();
            }else{
                var error = msgNode;
                if (error != ''){
                    $('interfase').innerHTML = error;
                }
            }
        }
     })
    });
</div>

I would be grateful for the help.