Ajax :: Multiple Calls Same Page Stops Working IE?
Aug 16, 2011
I have several ajax calls that originates from the same page its updating. It works perfectly in firefox but in IE it works for about 18 requests and then just stops until the page is refreshed. I thought it was a cashe issue but I have added a variable for that. I think it may have something to do with binding but I am not sure how to sort that. This is one of my functions.
Basically, what I am trying to do is call several ajax requests using jQuery on the same page, i know that all browsers are capable of requesting multiple requests. However in Chrome and Safari my website works fine, but IE, Firefox and Opera all only call the first request then dont call, the second two. I dont know why though?
I have a simple function for an intranet site that should make and return a XMLHttpRequest object in most browsers (including IE8):
function createXMLHttpRequest() { var xmlhttp = false; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest();
[Code]....
Then I use it autocomplete a input text with a list of client company names from a database. Then the user selects a company and it reloads the page with that company's info. (The ajax input text box remains so the user can type in another company name)
In firefox this works fine. However, in IE8 the very first time the page loads it works fine, but after the user selects a company and the page reloads, the ajax longer works. It gives an error at "xmlhttp = new XMLHttpRequest();" saying: "Message: Object doesn't support this property or method"
If I type anything in the input, it gives the error: "Message: 'searchReq.readyState' is null or not an object" leading me to believe that somehow after the first time the page loads, IE is not able to process a XMLHttpRequest which seems unlikely, so I'm not sure where to go with my code. I've tried a bunch of other similar createXMLHttpRequest() functions, but they all have the same problem of working once then not working after.
I'm developing an asp.net MVC app, and decided to take advantage of JQuery's great datepicker using the following code in my master page:
[Code]...
My problem is that the alert block of code never fires. When I change it to occur before the datepicker code, the alert fires but the datepicker part won't work. What am I doing wrong here?
I'm trying to make a little loop that in each itteration executes a little php script to send mail with the mail() function. the php script returns either succes or failure. Now its my intention to append that msg to a div, after every execution.
the show status(result) is nothing more then a .append(result) the zenMails(y) calls this function again to send the next mail. It does work though but it only updates the div after the entire loop is done, i 'ld think it ld do so after every execution since i call the showstatus when the synchronous call is done and only after that i call the next iteration. Is there anyway to work aroud this ? (making the call assync doesnt work , because the port for sending the mail would still be in use)
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.
My problem is that some of these myFunction#s include AJAX calls but the calls depend on each other in such a way that myFunction2 will not work unless myFunction1 has completed. So what is the "nicest" way to make sure of this? I've considered putting a hidden element in the HTML and then changing it at the end of each function call and have the onchange event trigger the next function call. But this seems very hacky and overcomplicated - surely there must be a simpler and better way....?
I'm trying to build a page that has multiple ajax calls on it. When you do it the old-fashioned way with XmlHttpRequest, you'd create a new xhr object for every call so that they execute simultaneously. If I try to do this in jquery it will only execute a call when the previous one has completed. This makes the page load time completely unacceptable. How to improve the performance?
within this page that has been created, there is an AJAX tree folder which calls another page to be loaded into a DIV by AJAX again. Code:
[Code]...
I don't know why it doesn't work because the page has been loaded with the JS file, but as soon as the link is added afterwards it doesn't work. I take it this is because it doesn't know where to find the JS, but how can I overcome this?
I am working on a project that relies heavily on AJAX calls, they are done in dozens of places. There are a number of places where I would want to prevent the user from submitting information multiple times (form submissions etc ). I am trying to think of the best way to accomplish this.
I could simply disable the element that starts the AJAX call upon the first click and re-enable it upon completion of the call. I have also seen examples of developers using a class to handle ajax calls that store an identifier for the call and if it is in progress any new calls with the same identifier will be ignored.
I'm trying to load a Javascript file which contains an array of data using .getScript(). It works fine on my server, but the request is never being made when I run it on my own computer, though the callback function is called. Is this an inherent limitation in JQuery/AJAX, or am I doing something stupid? code...
I have a ajax function implementation: when the user is on one site, the ajax call keeps checking the server every 5 seconds if there is a server url change. If there is, there will be a message displayed to direct the user to go to another site.
when the user go to another site, the ajax keeps checking every 10 seconds, if there is condition met, the message will be displayed to direct user to go back to the previous site. Also, after the message is displayed, ajax call keeps checking if there is another condition met, if there is, the message will automatically disappear.
The use case is: when one server is down, the message will direct the user to another site. On another site, when the previous server is up, the user could be redirected to the previous site. there is also scenario that when the message is displayed (when server is down), the user may not follow the link to do anything. he/she may simply leave the message on and go to lunch or something, when he/she comes back, the server may be already up and the message should be disappeared instead of keeping showing the message. Therefore, the message should be displayed or disappeared automatically based on the ajax call condition.
I implemented the ajax function and it did check and displayed message. However, it wont' display the message only until the user login or the user does a "refresh" to the page. After the message is displayed, when another condition met, the message won't disappear until the page is refreshed. Then the ajax calls keep doing fine every 10 seconds. The ajax call seems fine since when I set a alert, I did see the popup message show up every 10 seconds (but only after I refreshed the page.)
Now the problem is: the message can't be automatically displayed or disappeared. It can only happen when there is new page load (refresh). How can I solve this problem. I'm thinking of putting "windows.location.reload;" to load the page right after the condition met. But kind of feel I don't need to do this.
My website is all up and running and I decided to put a new image viewing script on, I already had a revolving image script showing all my previous work before but the latest script has totally stopped the previous from working. You can view what I mean at www.actioncomputing.co.uk
I am using 2 scripts both available on Dynamic Drive they are
I have a function to populate three listboxes. The items in the listboxes are from a MYSQL database and are related. The items are requested by a php page.
Most of the time everything works fine, but sometimes I end u with only one or two listboxes.
I can't figure out what's going wrong here. I've tested in Firefox and Internet Explorer, both the same problem.
Does anyone know why my code sometimes stops executing? Could it be that i made too many requests in a short time so the next request can't execute because the current has't finished?
I have a table with a SAVE button on each row (id=SaveBD)...but I also have aSAVE ALL button at the top. It works pretty good except the .each function seems torandomly stop near the end ofthe row countand not save all the rows.that would cause the rows to stop saving?
I'm encountering an AJAX problem when I try to execute multiple AJAX requests at the same time. What I want to do is delete a message and display the status (succes or failure) of that in div1, and refresh the messages on the page in div2. This needs (for as far as my knowledge reaches) two AJAX actions from which I both need the responseText.
The problem: What happens when I execute my script is that the second action (refresh a part of the page) happens before the deletion is executed. The result of this is that when the deletion has been executed, the page is already updated, and the deleted message is still there.
The script What I now have is: function doAjax(url, element_id, img_url){ var ajaxObject = createAjaxObject(); ajaxObject.open('GET', url, true); ajaxObject.onreadystatechange = function(){ if(ajaxObject.readyState==4 && ajaxObject.status==200){ document.getElementById(element_id).innerHTML = ajaxObject.responseText; delete ajaxObject; .....
WhenIrun the below code above the init code for jQuery plugins it stops them working. Im just trying to run the code after the DOM has loaded, is there a better way? <script type="text/javascript">$(document).ready(function() {
// The gallery is hidden so need to unhide it. document.getElementById('verticalCarousel').style.visibility='visible' }) </script>
I have four scripts being called to my page however i have two that isn�t playing nicely. The two in question is Fancybox and the Nivo Slider. The slider and fancybox both work alone but not when they are on the same page, however the slider will stop working when
Code:
Is used and nothing changed when i apply it to Fancybox instead. I have tried wrapping and dividing the scripts with
Code:
But nothing. I have also changed all
Code:
To
Code:
On the slider but again no change.
Here are the scripts in my <head> :
Code:
The problem mostly is that the slider won�t work in no conflict mode but won�t work with Fancybox either.
I have my doubts if this question belongs to the javascript side since it's all good until the data from MySQL comes in, but since the javascript is the one breaking I'll take my chances.
The external js (portada.js)
Code: $(document).ready(function(){ var currentPosition = 0; var currentPosition2 = 0; var currentPosition3 = 0;
[Code]....
As you can see I have three divs with different slideshows (slideshow, slideshow2 and slideshow3), they have products that slide to the left. When I was testing to make sure it all looks good the sliding feature was working fine, but I lost this feature when the data was being retrieved from MySQL (at the moment on <div class="slide">).
We have a page that allows a user to load a form over ajax using jQuery 1.3.2. The form contains a simple table layout, some input boxes, tinymce and the initialize for a jQueryUI dialog. On first load everything works fine. If the user loads the same form again, without refreshing the browser window, TinyMCE no longer shows content, can’t be clicked inside of and the dialog no longer updates it’s content and a few other bits of js stop firing.
Now I thought this was an issue with the page and ajax, but we have another page that uses draggable elements and has a very simple form of 1 input and a submit. If you submit the form and get returned the same page by our validation the same thing happens as with tinymce, you can no longer click inside it.
In ie7 things dont stop responding so much but the browser slows down and almost stops responding.
I'm trying to use the cascade function from the below link. If I try it as it is there, it works, but if I change the jquery reference to the one I'm using (1.7.1) it stops working... is there a diferent way to use that ajax call or am I missing anything?
I'm trying to create a demo to display a new way of showing our data.I thought I remembered this being pretty simple but I'm hitting a snag. The table, the mouse over, and the check row by clicking on the row all work separately but when the check row by clicking function is on, seen in the first row, the checkbox stops working.
I have a search function which works when I only want to have only one search per page, but as it involves a string call I'm not sure how to modify it to multiple search requests on a page.
The below works fine for one call:
<script type="text/javascript"> function showHint(str){ if (str.length==0){
[code]...
The above doesn't work and I am not sure what do about the showHint(str) as clearly I am not representing it properly in my attempt to modify the script.
I am trying to populate two select boxes with over hundred option elements for each. I have succeded in doing so but with a little problem. I make two xmlhttp calls one after another. What happens is that if the first call doesn't make it before the second, the data in the first select box fails to load and the second box succesfully loads data. I am new to the Ajax world but i am sure i am not doing it right.
I have a webpage where i load eachdifferentcontent through a function load and after i load that content a problem with jQueryoccurs...if i go directly to the page where i have the "datepick" without load the content it works, but if i load some content stops working...
$(document).ready(function(){
If you want to try it live to understand what is happening here is the url: [url]
When you open the webpage if you click on the textbox it will show the calendar, but if you navigate on the right menu and then press the text box won't work...