NetTalk Central

Author Topic: Showing a photograph in a browseForm  (Read 3340 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Showing a photograph in a browseForm
« on: August 05, 2010, 09:24:37 PM »
Hi,

I would like to show a small photograph on every browse line.
Is there an example on how to do this.
The photo that I 'd like to show is going to be a URL for Visual Lightbox, to be able to enlarge the photo when the user wants to have a closer look.

Kind regards,
Rene
Rene Simons
NT14.14

Larry Sand

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Re: Showing a photograph in a browseForm
« Reply #1 on: August 06, 2010, 09:58:16 AM »
Rene,

You just add your image to a cell in the table, and set the details on the Image tab.  If your lightbox uses the "rel" tag you can just add that information to the "alt" tag field.  Just set the source and alt fields to use a variable and set them to the correct image and tag info in the value routine.

The problem that you're going to run into is that the lightbox will only reference the correct images on the first page of the browse.  The reason for this is these type of scripts read the DOM looking for their tag(s) on document ready.  To get it to work you need to replace the AJAX JavaScript completion routine with your own to reset the lightbox whenever the browse page changes. 

For jQuery, I like this lightbox: http://fancybox.net/

Larry Sand

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Showing a photograph in a browseForm
« Reply #2 on: August 09, 2010, 10:05:34 PM »
see example 26, File Uploading.

Cheers
Bruce