Waiting for an Ajax response with a looong delay
Hello,
I have the following problem:
I have implemented a jquery tool to drag/resize textboxes. Now, I want to edit the text of the textbox. To do so, a pop up window is launched with a texteditor.
Now my question: My jquery script needs the data of the texteditor. How can I get the event when the text has been submitted?
Codesnippet (jQuery script)
-
window.open('url', 'title', 'menubar=no,width=800,height=370,toolbar=no');
var xhr;
if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest();
} else if (window.ActiveXObject) {
xhr = ActiveXObject("Msxm12.XMLHTTP");
}
xhr.open('GET', url);
xhr.send(null);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status >= 200 && xhr.status == 300) {
// fires immediately when the pop up is opened
}
}
}
the onreadystate function fires when the popup is launched. How can I get the event (with the text) when the form in the pop up window is submitted?
Many thanks,
mannyk