/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@BlakeMckennaauthorAug 30.2004 — Anyone have any thoughts on this?
Copy linkTweet thisAlerts:
@JPnycAug 30.2004 — 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.
Copy linkTweet thisAlerts:
@BlakeMckennaauthorAug 30.2004 — 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?
Copy linkTweet thisAlerts:
@JPnycAug 30.2004 — 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.
Copy linkTweet thisAlerts:
@BlakeMckennaauthorAug 30.2004 — 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?
Copy linkTweet thisAlerts:
@JPnycAug 30.2004 — 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?
Copy linkTweet thisAlerts:
@BlakeMckennaauthorAug 31.2004 — 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.
Copy linkTweet thisAlerts:
@JPnycAug 31.2004 — 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.
×

Success!

Help @BlakeMckenna spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...