Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

706 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

20 Experts available now in Live!

Get 1:1 Help Now