Forum Moderators: open

Message Too Old, No Replies

Images

         

Dragonisle

1:30 am on Oct 2, 2007 (gmt 0)

10+ Year Member



Hi,
I will try the javascript group. Ive searched a bit online on a question that I have and cant find the answer, dont know if its possible and I dont really know how to explain it or what to call this.
Here goes:
I want to create a HTML page that has about 100 links. These links will take you to a single HTML page that will show a image (depending on what link you clicked). Is it possible to display a image depending on what link you clicked using CSS using only 1 html page?
For example:
on a html page you have 3 links: xbox, ps3 and Wii.

The user clicks on xbox.
A xbox html page appears w/ a pic of a xbox

user closes the xbox page.

Now the user clicks on ps3.
A ps3 html page appears w/ a pic of a ps3.

The catch is I want to use only 1 html page to display the pics using any kind of scripting (java or asp or whatever will work). The xbox, ps3 and Wii html page is the same html page. It appears that a variable has to be used to determine which picture to display in the html page.

any ideas or is this confusing? :)

thanks

Arno_Adams

7:07 am on Oct 2, 2007 (gmt 0)

10+ Year Member



Hi,

just pass the id or name of the image in the querystring.

HTH, AA

daveVk

8:06 am on Oct 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In the case of the 3 item example, consider putting code for all three in one page/file with initially 2 of 3, or 3 of 3 hidden. Include some script of unhiding as desired.

Not sure thats what you want.

For 100 images pages built from common template, as AA suggests use links like /image.html?image=56 and use server side scripting to build image page, PHP maybe.

Drag_Racer

8:27 am on Oct 2, 2007 (gmt 0)

10+ Year Member



Not only is it possible, but even easier to do with the links and image view on the same page. With a little css and javascript you can have the links toggle display of the set of links and the proper image shows with a link to reverse the display. For non-javascript enabled browsers the link just follows to the image, either in a new window or current.

NO server side scripting is needed for something this simple.

Dragonisle

12:46 am on Oct 3, 2007 (gmt 0)

10+ Year Member



anyone have any examples or links? Im not sure on what this is called as I can search this myself.
Thanks again.

Dragonisle

1:18 am on Oct 3, 2007 (gmt 0)

10+ Year Member



I think I got some of what Im looking for. I will work on it a bit more.
Thanks