iBrasten

My methods of calculating time are far superior to yours, in every way.

About

This is the blog of Brasten Sager, a freelance software developer, Mariners fan (nevermind), guitarist, haphazard philosopher.

Riddle me this...

February 13, 2006 @ 03:06 AM

Here’s an interesting one.

Scenario:
Web page A opens a popup.  The Popup then uses self.opener to call a function in web page A.  That function in web page A fires off an AJAX call and closes the popup.

Weird behavior:
The AJAX call is correct.  It works.  The problem I’m finding is when the popup closes immediately after the AJAX call is fired, the request object comes back with no data.  However, when the popup is timed to close even 250 milliseconds after the AJAX call, everything works.  Keep in mind the AJAX code is on the MAIN page, not the popup, though the function was called from the popup.

Workaround:
setTimeout(‘closePopup()’, 250);  But I don’t like doing that.

Any ideas?

0 Responses to “Riddle me this...”

Leave a Reply