On Wednesday, March 18, 2015 at 3:11:26 AM UTC-7, Ramos wrote:
>
> i do like this
>
> dom event
> onclick="$('drop_html_here').html("wait!!!");my_ajax_function();"
>
> <script>
> function my_ajax_function(){
> call your ajax function ....
> this function should return some html to replace your initial "wait!!!"
> </script>
>

Thank you.  This works pretty well, when I put the  ID of the target div in 
the $("..."). 

>  
>

> 2015-03-18 2:38 GMT+00:00 Leonel Câmara <[email protected] <javascript:>
> >:
>
>> Yeah, just insert an element into the dom with it and then remove or hide 
>> it whe
>>
> n the ajax call is done.
>>
>
Ramos' version swaps in new content twice per click:  the "wait!!!" is one 
swap, and then the waited-for-content is another swap.
Your method potentially cuts down the swaps (but the same number of 
redraws).  I am still interested, though, in having the 
cursor do the hour-glass thing.  Is cursor changing just a javascript call 
away?

/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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to