Skip to main content
Participant
January 26, 2009
Question

popup image

  • January 26, 2009
  • 4 replies
  • 479 views
Have just gone through the cold fusion getting started tutorial. Managed to work through that.
Having generated a gallery, how do i get a large version of the image to popup in a new window on click much like a
javascript command in HTML ?
    This topic has been closed for replies.

    4 replies

    Inspiring
    January 27, 2009
    yeah... 60 cfc? 60 queries?
    sounds like you need to go back to that getting started tutorial...

    you know that you can pass arguments to a cfc? like the artist id? and
    have the query in your cfc return the artist details based on that id
    you passed to it?
    bottom line: you need 1 function with 1 query in one cfc only.

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/
    January 26, 2009
    Excuse me a second...60 queries?? 60 CFC's?? Wooohhaa there. Why so many? Can't you do a single query to get all artists and loop them out? What you just said sounds crazy and unsustainable.

    With regards to the image issue...I think the jQuery method basically gets the larger version from a link in the loop. So, for example, each small image has a large image too, but you don't output both, you link to it and using the JS you detect what gets clicked and it grabs the big version. jQuery Lightbox handles most this for you. For example, all you have to do is something like:

    From this:
    <img src="images/#artwork.largeimage#" width="200" height="200">

    To this:
    <a href="images/#artwork.largeimage_LARGEVERSION#"><img src="images/#artwork.largeimage#" width="200" height="200" /></a>

    I mean, clearly, that stuff above wont work...but it's there to give you an idea. Get it so far?

    Let me know if you're still having problems.

    Thanks,
    Mikey.
    rustywebAuthor
    Participant
    January 26, 2009
    Thanks for the reply. I guess my stumbling block is this:
    I have a dbase with 60 artists averaging 6 images or so each.
    I have an index pages which lists all 60 artist.
    I have one cfm page and 60 cfc pages calling the works of each particular artist.
    When the page displays dynamically showing the 6 images of that particular artist. How does a javascript behavior know which image i wish to enlarge ?

    the whole point of the cold fusion is that i only have to create the one cfm
    page and 60 queries with one variation.

    sorry if this is a little confused.

    thanks again

    R
    January 26, 2009
    Sound like you'll need JavaScript.

    Have you tried this?

    http://leandrovieira.com/projects/jquery/lightbox/

    Mikey.