php - jQuery AJAX timing issue -


In my backend, I am using jquery 1.4.1 and the latest UI 1.8rc1. I have defined some buttons that do some work ... one creates a certain type of page which calls a php file using serialized functions and then reloads the whole page. Locally it always works like charm! But as soon as I put it on my webserver, it only works 5% of the time. Code:

  button: {'seat erstellon': function () {$ .post ("web admin / page .create.serialize.php", $ ("# page-form"). Sort()); $ (This) .dialog ('Pass'); Location.reload (true); }, 'Abbrechen': function () {$ (this) .dialog ('off'); }},  

When it gets interesting, when I put in a warning just before the location. Reload part - it will always work so it takes time so that serialization is executed but the page can not end before reloading. I know that serializing does not mean to reload the page, but I create a navigation etc. So I need to reload. (I was thinking about that time ... I could really sort everything ... anyway) is there a simple solution? Is there something like a timer, unless it is done serialization, can I make it? Is this a normal behavior?

Method:

  $ Post ("webadmin / pages.create.serialize.php", $ ("# page-form"). Serialize (), function (data, textstate, xhr) {warning ("I'm loading now!"); });  

It is not certain what is inside this "callback function", so I leave the reader as a drill. : -)


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -