On Tuesday, April 19, 2016 at 3:36:18 PM UTC-7, Dave S wrote:
>
>
>
> On Tuesday, April 19, 2016 at 2:09:32 PM UTC-7, bria...@gmail.com wrote:
>>
>> I uploaded the image via the media function of the built-in wiki. I 
>> created a link to the larger image to display it when user click on 
>> the thumbnail. But instead, it downloads the larger image.
>>
>> Please advise how to display the image instead of download it through the 
>> anchor tag.
>>
>> <a href="@////21/wirelessicon-large.jpg"><img alt="" 
>> src="@////21/wirelessicon-thumbnail.jpg" /></a>
>>
>> Thanks,
>> CD
>>
>
>
> What you may want is an onclick() function that uses ajax to replace the 
> thumbnail image with the full image.  You'd wrap the img tag in a div with 
> an id (say, "target"), and the ajax call would replace the contents of the 
> div (with another img tag).
>
> If you want the thumbnail to still be displayed, you'd have it's img tag 
> outside the "target" div.
>
> See more detail at 
> <URL:http://web2py.com/books/default/chapter/29/11/jquery-and-ajax>
>
>
You may find the LOAD() helper easier to start with than the direct ajax:
<URL:http://web2py.com/books/default/chapter/29/12/components-and-plugins#Components--LOAD-and-Ajax>

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

Reply via email to