[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-03 Thread Akash B
Thanks for the suggestion! I added a header check for the web2py-component-element header. I had to manually add the value to response.headers (from request.cid) because I'm using a call to web2py_component I guess. But it works perfectly!! On Thursday, August 3, 2017 at 6:28:07 PM UTC-7, Anth

[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-03 Thread Anthony
Be careful that your page isn't making any other Ajax requests, as your code is not limited to the component requests only. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issue

[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-03 Thread Akash B
Thanks Anthony!! I resolved my problem with an ajaxSuccess event handler. I am calling a web2py_component with the target div and using setTimeout to achieve what I want. The code snippet in demo/f1.html is below for anyone who may be interested: my_url = "{{=URL('demo', 'f1.load')}}"; update_i

[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-02 Thread Anthony
> > I have an alert to verify that the data-w2p_remote is set correctly but > the XHR is still made to the default page. > Is there some sort of a trigger or a function that I can call that lets > the code in web2py.js know that the URL in the data-w2p_remote attribute > was changed? > That wou

[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-02 Thread Akash B
Thank you for your response. As you suggested, I am currently trying to get around this by manually adding the div layer (instead of LOAD helper) and setting the generated link from the controller using response.js. Snippet below: In demo/f1.html: loading... In controller f1: url =

[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-02 Thread Anthony
> > >1. My actual goal is to load this grid and keep refreshing it every 10 >seconds through XHR. For this, I created a simple view "demo/f1.load" > which >contains {{=grid}} and the "demo/f1.html" view has the following: >{{=LOAD('demo', 'f1.load', ajax=True, content='Loading..