5 Replies Latest reply on Oct 17, 2008 4:23 PM by fober1

    Drawing Dynamic images that can be links

    fmdano74
      Hey all,
      so his is my question...can I draw rectangles on a page dynamically--one time I may need 6 then next i may need 12. I also want to know if these rectangles can be dynamically named, and be turned into links.
      I am trying to take a page with pictures in rows on the page, and create rectangles above each image that would be a link box so if a user wants to click on the image, some action would take place.
      Is this something that can be done in coldfusion, or is it more a flex/flash thing? I figure there is no way to give the user the ability to use the cursor draw the box?

      thanks for any help.
      dan
        • 1. Re: Drawing Dynamic images that can be links
          fober1 Level 1
          Hi,
          Flex or flash is not necessary. That can be done in HTML, and you can use CF to generate all the HTML that is necessary.

          You can use a "DIV" tag with "onclick" for the link
          Have a look at the following HTML/CSS attributes: position:absolute; top, left;

          Google for "HTML position absolute".

          I'm not sure what you want to do dynamically withe these frame, but also have a look at "HTML image map", and how they return where on the image a user has clicked. You would need that if the web user should be able to define where the frames are.

          cheers,
          fober


          • 2. Re: Drawing Dynamic images that can be links
            fmdano74 Level 1
            Hey,
            Thanks for that...I figured I could use Image Map, but don't I have to create each image map area? I want to use cold fusion to dynamically generate the image may based around some criteria put into an input screen...for example:
            A user would put in the need for 3 rows of 4 images and each image is 1x2, and each image is .5" apart. Can I use this info to create an image map? Then, can I label each image map grid area with a different name and that name be stored in the database? I want each square of the image map to be linked to separate data in the database....
            So, can using a image map work with this criteria?

            Thanks for replying and helping me try to figure this out...
            dan
            • 3. Re: Drawing Dynamic images that can be links
              fober1 Level 1
              Hi,

              There are many options how this can be done from a technical perspective. Which one is the best to use depends on what your goal is.

              Based on the description above I'm still not sure what you are aiming for. On a basic level are you looking to dynamically generate a page that allows to generate a gallery, where users enter the name and the coordinates or upload pictures (admin-page), or are you looking to build a page where users look at the pictures based on the information in the database (viewer-page)?

              If you are looking to create a viewer page, then the best way to come up with a solution is to know what the html page looks like that the user should see, and then we can have a look at how to generate that dynamically.
              You can have a look for sample gallery pages here.
              http://www.dynamicdrive.com/

              If you want to build the whole admin area and don't know where to start, then the forum may not be the right place because that will take a lot of time and work.

              - fober
              • 4. Re: Drawing Dynamic images that can be links
                fmdano74 Level 1
                Well, basically what I am interested in doing is this:
                i am interested in taking my yearbook and doing something interactive online...each class has pics set in rows on multiple pages. I want each page to be the back drop, and I want to create a type if grid/image map on top of each pic. each square needs to be named dynamically and that name is a key in the database, so i can store data about each person.
                I know I could use an image map, but not sure if I can label each square dynamically or not.
                I am not trying to get all the answers from the forum, just trying to see what is the best approach...CF,flash,flex,etc.

                Thanks for taking the time to read this and think of some ideas.
                dan
                • 5. Re: Drawing Dynamic images that can be links
                  fober1 Level 1
                  Hm, ok, that's a start.
                  And I guess you're new to CF.
                  If you want to add comments dynamically then you need to have a database in the background.
                  Created databases before?

                  one more question regarding the pictures. Are you talking about group pictures, and you need to be able to select frames within that pictures, like here: http://www.flickr.com/photos/ciskatobing/96061933/
                  or a more gallery kind of display like here:
                  http://www.flickr.com/photos/ciskatobing/sets/72057594086033994/

                  You definitely don't need flex of flash for that, but ColdFusion, HTML, CSS, Database/SQL skills.
                  It's not an easy or simple project, it will take time, and nobody here will be able to provide a finished solution. But we can help you if you have questions.

                  cheers,
                  fober