views:

62

answers:

2

Im using stuff like document.body.innerHTML but I dont need my page source, I need it to get an external page source, since

new Ajax.Updater ({success:'employerBox'}, '<%=appRootPath%>/userBoxHome.asp?isEmployer=true&ajaxLogin=home', {evalScripts: true});

Is not working in IE and I need div employerBox to get updated with the content from /userBoxHome.asp?isEmployer=true&ajaxLogin=home

Any suggestions please or any functions that Im missing?

My idea, I know the code is wrong, is to do something like document.body.innerHTML('userBoxHome.asp?isEmployer=true&ajaxLogin=home')

Thank you

A: 

You might want to check this out:

http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/

sworoc
+2  A: 
function updateEmployerBox(){
    var div=$('employerBox');
    var url='<%=appRootPath%>/userBoxHome.asp?isEmployer=true&ajaxLogin=home';
    var options = {
        method:'get',
        onSuccess: function(transport){
            div.innerHTML=transport.responseText;
        },
        onFailure: function(transport){
            alert('Failed '+transport.responseText);
        }
    };//end options
    new Ajax.Request(url,options);
}
stormdrain
"Ajax.Request" is this Prototype? Just curious, a quick look on Google seems to think so.
sworoc
It is prototype. The question is tagged as such, is this tag incorrect?
stormdrain