Solved

How to create a common HTML page to display details of images selected from a previous page

Posted on 2013-01-28
1
263 Views
Last Modified: 2013-02-19
In a web application (with HTML, javascript, CSS etc)I am creating a start up HTML page that contain lots of images.

Then when the user clicks any of the images, another window pops up with details of that selected image. This page contains
1. The larger version of the of image
2. Detailed description

I want to keep this second message window a common one for all images. So I plan to use
ajax to read details of each image from a file. Then build the contents of the page dynamically using javascript.

By problem is to tell the second window what image was selected from first page so that
I can pull information of that image from the file shwo build the second page dynamically.

So how should I send a value from one page to another in HTML?
0
Comment
Question by:prain
1 Comment
 
LVL 38

Accepted Solution

by:
Tom Beck earned 250 total points
ID: 38829561
It sounds like you want a modal popup (a div on the same page that you toggle on and off using javascript). This div can be loaded with the necessary image and details using an ajax call to the second page by using an url with a query at the end to hold the id of the image selected.

Example: http://www.mydomain.com/largeImage.html?id=img123

When the second page reads from the file using the image id to select the proper image and details, you can then use some javascript on that page to fill in the blanks, i.e large image path and details text.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JavaScript let vs var 5 27
Select case on click 3 16
Button and js nou working 3 8
Hide Table in merge 3 10
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question