I'm having (once again) tremendous problems with IE (7), trying to create an application that behaves properly.
This time, it's with Ajax calls triggered by a button click, which do not behave asynchronously.
Here is the highlight of what I'm trying to achieve: a button clicked sends an ajax call to the server whilst the call is made and until the callback function has returned (or an error has been identified), a "wait" animation is triggered. (in the case below, simulated by appending a status in a div)
To achieve this, I decide to use .ajaxStart(), .ajaxStop() and .ajaxError() to trigger the wait animation. It works perfectly in FF and Chrome, but (as usual) not in IE. In IE, when I press the button, the button remains depressed until the ajax call is finished, and then all statuses are dumped at once onto screen. Not very asynchronous...
Here is my code:
If I uncomment line 11 and uncomment the alert, it seems that this forces IE to do things in the proper order. Obviously that's not a solution however...
Will I have to (once again) write IE-specific code to get things working properly?
I'd like to process several blocks of parallel actions, but in a sequential manner.
As an example:
Thus, I want to process blocks, from which I don't know how long they will take and afterwards have a couple of actions, before beginning with another block. I already tried it through using .queue, .ready() etc, but that leads to very ugly or unusable code..
Can I do the following without my program crashing? [code]...
I have created an application that does something similar to the code I just posted. However, my program crashes intermittently. Sometimes it will crash after calling jQuery.get() a few times (with several http requests still pending). Other times it will get through all of them just fine.
I want to know if Ajax can handle that many asynchronous requests without crashing? Can someone look at this to see if there is something I am missing?
Im trying to use jquery to try to do what the image shows: Its for a website made for iphone so im trying to add the slide effect. It all seems a little complicated, but ill explain: 1-The user clicks a link 2-A loading message (or image) appears Meanwhile, the new page loads on a hidden side (its a FULL page, not just a div)
Does anybody know how to load an IFrame in the background of the browser, without interfering with running JQuery animations?
I have this page that contains an IFrame. Using JQuery I set the src attribute to a certain url.
But my page is also showing an animating span continuously. (kind of progress-bar). When the IFrame is loading a large image of the external url, the browser stops temporarily, until the images is loaded, so my animation is stopped for an instant, and then continues.
I am building a library of functions which call this function, so I cannot have the data processing done within the success function, I need to extract the data itself.
I have some trouble with my app. User enters his login&pass, they are being checked on server using ajax, and if they're ok, i wanna open new page, which'll set cookies and session vars, but i have an universal script, and I need request something like universalScript?mode=login (mode is GET) and some POST parameters such as login and pass, besides it must be new page, not ajax, Some ideas?
I want to send another ajax request when one request is in process to get the status of first request. If I call both the request the second request gets blocked till the completion of the first request.
I am using AJAX and coldfusion, and am having trouble getting some alerts to work. I am using the http object in javascript: var url="add_item.cfm" oXmlHttpadditem=GetHttpObject(addStateChanged); oXmlHttpadditem.open("GET",url,true); oXmlHttpadditem.send(null);
then, in add_item.cfm, I am just using: <script type="text/javascript">window.alert("Hello World ");</script>
but the alert isn't being displayed. I assume this has to do with client-side/server-side issues, but can someone please clarify why this doesn't work, and perhaps offer a fix or alternative solution?
I run a streaming site and would like google adsense to appear at the bottom of the page/stream every 3 minutes, stay for 15 seconds and then close automatically. Then after another 3 minutes they'd appear again, stay for 15 seconds and then close again, etc, etc.I'd imagine having the adsense in an iframe would be easier.I'd also like to give users the option to close the adsense using a close button at the top of the iframe if they don't want to wait 15 seconds.
at the day i include to my web page an iframe , in browser like firefox , opera works fine, but in ie6 sometimes cannot load the content of iframe , and a code who load page in iframe
I have an asp page page with a DIV container that is activated when a user clicks a link (using javascript to activate it. It pops up similar to a light box).
The contents of the DIV is an Iframe from another website. The Iframe is hidden when the page loads.
Loading in the Iframe when the page loads is affecting performance of the page.
I'm wondering if there is a way to load the Iframe when the user clicks the link to activate the DIV light box. This way the page doesn't have to load the Iframe straight away... only when the user needs it...
This works fine and opens up my registration page. However when I have the type commented it won't display my reCaptcha. If I uncomment this in my jQuery then it will display the reCaptcha.
I have a page that includes an iframe, i want to execute a script after the whole page is loaded and also after the iframe content is loaded too, which event i should use?
I want to load an iframe with Javascript after my HTML finishes loading, but I also want people without Javascript to be able to view it. How can I do that?
Maybe I can create the iframe with a src, and remove the src with Javascript before the iframe loads. Then load the iframe after the page loads. How do I do that?
I think it's okay to ask this question in this group, but if not please point me to the correct one!
How does one go about doing asynchronous updates between two web clients? Take Google Chat for example... how does Google Chat update a chatter's chat window with text entered by the other chatter?
I have found a couple different code snippits that allow you to determine when a page has finished loading in an IFRAME. However, what I need is a way to determine this when it is a form that is POSTing to that IFRAME (which is on a remote web site).
Basically on my page there is a button that submits a form to another website and the target = the IFRAME. However, I don't want to actually display the content from the other site (and so the IFRAME is invisible). I just need to know when the submission is complete. As a user you can tell by watching the status bar in IE to see that the submission is still processing, but I'm looking for a more elegant way to do this (as I want to tie it into a mechnism that will visually show the user the status of the submission in real time.)
I have an iframe. I load a page within it. The page I load is a php page that I build with a table with the id of 'readmail_table'. My iframe is 'readmail_frame'. Someone clicks on a message title outside of the iframe and I load the contents of the message in the iframe from the database in my table. Sometimes this takes longer than others depending on how large the message is. What I am doing here is letting the contents load then calculating the width and height of the table and then increasing the iframe's size so there are no scrollbars. This works 98% of the time but I ran into an issue where the table does not exist yet in the iframe and the JS code errors out. So what I did then was add a local var, set it to false then had a while loop check for the table and once it finds it, set the var to false and run my code. Again, mixed results. Sometimes this works then others I get that the table id I am looking for is null but my if statement in the while loop is checking to see if != null line 159 is where it is breaking The error I am getting in firebug is
[Code]...
Code: if ( window.frames[ "readmail_frame" ].document ) Like I said, most of the time this works exactly how I need it. I just need a fool proof way to determine that this table is in fact on the page. I am not sure why it works sometimes and not others since I am looping until it is there
I'm trying to get a return boolean or something I could use to then do another asynchronous request have my first has completely finished.
I'm messing around with Javascript on this basic PHP blog I built and I have a table of articles and one of the table columns is published/unpublished. I'm trying to have when they click the icon it will connect to MySQL, update the current row with new publish value (opposite of current) then refresh the div id element that the publish/unpublish icon is in to reveal the new status. I built a class for my javascript requests so most values are stored in global properties.
I think what I'm coming across is when I click the icon it updates the table but before that onreadystatechange can hit 4 my request for the new content is going through so the request url I'm using as well as the return div id for the responseText are getting mixed up between trying to do a sql update, loading the responseText in "message" then trying to sql query for the new results and loading that responseText in "content".
I've got a script that, onload, loops through every tag on the page (getElementsByTagName ('*')) and can be pretty slow on some of my pages with MANY tags.
What I'm wondering is if there's some way I can tell the browser to run the script asynchronously, without locking up the browser while it loops through all the tags and adds its objects and properties to them?
I'm pretty sure I've made the script about as effecient as possible. There's just no way around checking all the tags.
I need to create a callback for a line of code that performs asynchronous work so that another a line of code can be called after it is finished. I've found a number of webpages that attempt to show how this can be done with two functions, one calling the other in Russian-doll fashion, but I can't see how to do it with my code.It takes the URL of a sound file, redefines a previously defined embed to point at that sound file, and then plays it. The problem is that I lose focus on the documentElement that was selected before the playIt() function is called. So in the playIt() function I save the focused element in a variable and focus() it after the embed-switcheroo and autoplay is performed. This doesn't work, because the "e.parentNode.replaceChild(clone, e);" is performed asynchronously; when it finishes, it clears the focus in the document (internal id's have changed? Reason unknown.) So I need the focus() code to follow the replaceChild() code. I want to accomplish this by having the focus() code execute as a callback following the replaceChild() code. How would I break this into two procedures, one calling the other, reproducing a synchronous flow?