Link to home
Create AccountLog in
JavaScript

JavaScript

--

Questions

--

Followers

Top Experts

Avatar of Mike Eghtebas
Mike Eghtebas🇺🇸

insert image dynamically
I have a good solution from Rainer Jeschor at https://www.experts-exchange.com/questions/28651880/insert-image-into-html-file-dynamically.html (see zipped file).

The default.html in this folder has two <a> tags. Thy open EEDynamicImage.html and depending which <a> tag is clicked on, inserts the respective image to EEDynamicImage.html.

Question: How can I apply jQuery or bootstarp to jazz it up a bit.

Right now, it opens off center with not much tech used in the process. What are good way of doing this. I may also need to pass the image box size, margin, etc. dynamically but handling all these attributes dynamically could be handled in a new question later on.
Dynamic-Image.zip

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Tom BeckTom Beck🇺🇸

There are dozens of ways to apply the script to a real world situation. Since you mentioned bootstrap, here's the script (altered slightly) applied to a standard bootstrap template (sticky footer).
TempSite.zip

Avatar of Mike EghtebasMike Eghtebas🇺🇸

ASKER

Hi Tom,

Thank you for solution.

Why I want to have a dynamic page like this: I have about 10 images to display. if I use image_1.html, image_2.html, ... image_10.html, there will be too many pages to store and work with. I can use single blank page but the image shows up in the corner and cannot apply style to it. There is no other reason for this activity. So, I have revised the solution and uploaded back.

The image shows up in the center which is good. What I am looking for in this question is to have some image-opening-effect (like those in MovieMaker transition for example). Something nice not drastic. One that comes to mind the image shows up like pieces of shattered glass the pieces moves together to for the final picture. I am not necessarily asking for this. Anything descent with similar behavior.

In my next question I will be looking to pass images sizes or better yet take the 100% .png file sizes.

Question: How can I apply image-open effect described above?

Thanks,

Mike
TempSiteRev-1.zip

ASKER CERTIFIED SOLUTION
Avatar of Tom BeckTom Beck🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

JavaScript

JavaScript

--

Questions

--

Followers

Top Experts

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.