When trying to update several pocketquery macros in a confluence page using javascript (a button) it happens that some of then are not finally rendered. I've checked that is not a problem of the installation or related to the google chart graphics... on the contrary I think is related to the execution time of the query. In general all queries executed in less than 10s have not problems in rendering properly when updating with the javascript button... but those queries taking, in general, more than 10s are usually not finnaly displayed remaining the "ongoing" icon in the screen...
The code of my template is as follows:
<form id="my-pocketquery-form" class="aui">
<button type="button" onclick = "reloda()" >UPDATE</button>
</form>
<script>
-- solution
jQuery.ajaxSetup({timeout: 60000});
function reloda()
{
jQuery('.pocketquery-dynamic-load').each(function() {
var container = jQuery(this);
var dataIndex = container.data('index');
data = PocketQuery.getDynamicLoadData(dataIndex);
PocketQuery.load({
container: container,
data: data
});
});
}
</script>
Is there somewhere a "timeout" parametter I could modify to make it work properly or is there any other code for my template solving this issue?
Thanks in advance!
I think I've found the solution myself!
Now it is working writing "jQuery.ajaxSetup({timeout: 60000});" at the begining of the script...
Hope it helps someone else!
Hi Cuto! Just wanted to let you: your solution will change the Ajax setup for any request on your page, not only the ones from PocketQuery. You should add the url flag to the object you're giving to ajaxSetup as described in the jQuery docs.
I put a new timeout parameter flag for the PocketQuery.load method on our roadmap!
By the way: would you be willing to install our release candidate for PocketQuery 2.1? This release has the PocketQuery Admin split from the Confluence Admin and it could be useful for you . You can find it here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Felix! Thanks again!
I will take a look! What will be good maybe is to have the possibility to define the ajaxSetup timeout as a Pocketquery parametter then...
I knew already about your 2.1 version and I was waiting for it... if the PocketQuery Admin has been splitted from the Confluence Admin 50% of my "pending requests" is already covered... and it would ony rest the possibility to print out!!!
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cuto,
Your should "accept" your answer to help people see this request have a resolution
Best regards, Damien.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah! Thanks! Not very "familiar" with this system!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem
A bit of people accept answer
But, in my opinion it's a bad choice, cause we can't know when they need more help or not.
For people who need for an answer, they can't know if a solution worked or not
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.