/    Sign up×
Community /Pin to ProfileBookmark

popup, ajax, and popup.close()

Total Edit:

simpler problem

see this:

function loadXMLDoc(url){

if (window.XMLHttpRequest){

xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=state_Change;
xmlhttp.open(“GET”,url,true);
xmlhttp.setRequestHeader(‘If-Modified-Since’, ‘Wed, 15 Nov 1995 00:00:00 GMT’);
xmlhttp.send(null);
}
else if (window.ActiveXObject){

alert(‘before’);
xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);
alert(‘after’);
if (xmlhttp){
xmlhttp.onreadystatechange=state_Change;
xmlhttp.open(“GET”,url,true);
xmlhttp.send(null);
} else {
alert(‘Erro ao iniciar XML request’);
}
} else {
alert(“Error initializing XMLHttpRequest”);
return;
}

}

when called in ie, alert(‘before’) appears, alert(‘after’) never comes out, any ideas or is my ie f****d up?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@EricWAug 04.2006 — What I ended up doing was rather than triggering the Ajax stuff in the popup, I

had the popup run a function in the parent page that put an entry into an array in the parent that was checked every second triggering the Ajax request. So the parent page did the Ajax call and everything worked.

Hope this helped!
×

Success!

Help @TruthSeeker spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...