[web2py] Re: Adding the loading gif to my application

2020-01-18 Thread mostwanted
 The problem is when i click a link to go to other pages the links only 
works at loading the gif, they dont re-direct to relevant requested pages!
What am i doing wrong? How can I fix it?

*loading.load*


*LOADING SCRIPT*

#loading
{
visibility: hidden;
}


$(document).ready(function()
  {
$('a').click(function(e)
 {
$('#loading').css('visibility', 'visible');
e.preventDefault();
});
});


   {{=LOAD('default','loading.load',ajax=True)}}



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b0de38f6-fb3a-458d-b005-058dc40d4a4f%40googlegroups.com.


[web2py] Re: Adding the loading gif to my application

2020-01-17 Thread Dave S


On Friday, January 17, 2020 at 1:58:12 PM UTC-8, mostwanted wrote:
>
> Hi guys can someone please help me with a clear definition of how I can 
> add a loading gif to my application, one which will be displayed while the 
> user is waiting for a page to open after clicking a link. Most of the 
> discussions on this topic are not clear on how this can be achieved.
>
> Regards
>
> Mostwanted
>

If javascript is enabled (and usually is for web2py pages), the easiest way 
is to load the gif when you load the referencing page (that is, the page 
with the link to be clicked).  Load it with attribute visibility set to 
hidden.  Use the js to detect the link click, and set the attribute to 
visible.

If you're doing a LOAD() within the referencing frame, then the DIV where 
the LOAD() occurs can include 


I haven't done this for a while, so a good refresher for me.

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/96168dc3-ab96-4454-9bf9-9718d7269732%40googlegroups.com.