dcsimg
www.webdeveloper.com
Results 1 to 9 of 9

Thread: Loading images dynamically to a web page?

  1. #1
    Join Date
    Aug 2004
    Posts
    11

    Loading images dynamically to a web page?

    I am new to Javascript and internet programming in general. I am trying to place a table on a web page and load, dynamically, a bunch of pictures into this table. The pictures already reside on my web server. I'm just not sure what the code is for doing such a thing. Anyone have any ideas or code examples.

    Thanks,
    Blake

  2. #2
    Join Date
    Aug 2004
    Posts
    11
    Anyone have any thoughts on this?

  3. #3
    Join Date
    May 2004
    Location
    Manhattan NY
    Posts
    6,028
    Can you explain why you want to do this? Will the photos be different each time or something? NEed more info on exactly what you want to happen.

  4. #4
    Join Date
    Aug 2004
    Posts
    11
    Actually what I am trying to do is load about 150 images (thumbnails if possible) from the server onto a table on a single page. Then allow the users to put the mouse on each image and have the image blow up to it's normal size. Is there any kind of loop construct that will accomodate this?
    Last edited by BlakeMckenna; 08-30-2004 at 06:44 PM.

  5. #5
    Join Date
    May 2004
    Location
    Manhattan NY
    Posts
    6,028
    Well it won't save you that much work to load the images dynamically. You'd have to code them into an array, then use createNode statements for the table, tr, and td and img tags. You'd also have to generate the whole page dynamically, which means the javascript function that would make the images large size, would have to be output by the 1st JS. Doesn't make sense.

    It would be more complex than just coding the HTML doc, and putting the mouseover script in the header of the page.

    But you'll find other problems. When you enlarge the thumbnails, it's gonna push around everything else on the page.

    If you really wanna do it dynamically, I recommend serverside scripting, PHP or ASP or some other.

  6. #6
    Join Date
    Aug 2004
    Posts
    11
    ASP would work. Problem is I don't know of any good examples of what I am trying to do...do you by any chance?

  7. #7
    Join Date
    May 2004
    Location
    Manhattan NY
    Posts
    6,028
    No, not offhand. But your server has to support ASP. Better check that out before choosing a language. But like I said, you're going to run into other problems. When you make the pic large, it'll push everything else out of position on the page. It'll be an ugly effect in general. Have you seen pages that use a thinner left frame for the thumbnails that scrolls, and a larger other frame for the large pic to display?
    Last edited by JPnyc; 08-30-2004 at 09:53 PM.

  8. #8
    Join Date
    Aug 2004
    Posts
    11
    No, I haven't seen either of these kinds of objects. I will try to do some more research I guess. Thanks for your help though.

  9. #9
    Join Date
    May 2004
    Location
    Manhattan NY
    Posts
    6,028
    I thought of a way it wouldn't mess up your page. You could set the z-index to 2, or whatever so it will be in FRONT of the rest of the page. Shouldn't affect anything's placement then. It would just float above it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles