Solved

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

Posted on 2013-01-28
1
262 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
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 …

930 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now