Forum Moderators: phranque

Message Too Old, No Replies

How would I do this (changing background image)

         

traaacker

6:01 am on Mar 2, 2006 (gmt 0)

10+ Year Member



I have a list of many small images. I would like to make each one clickable, so that when an image is clicked, a new window opens, and that image is placed into the background, so it tiles.

I'm not sure how to go about this. Perhaps I have no other choice but to use javascript. I've been thinking on a way to work around this, without editing 100 extra pages all with a different background image pre-embeded.

I do know a little bit about php, if that helps.

Suggestions?

Raymond

6:09 am on Mar 2, 2006 (gmt 0)

10+ Year Member



If you don't want to use jscript, you can use asp/vb.

On each thumbnail, you link to a new window (change the [path of image file] to the actual path:

<a href="/pictureframe.asp?path=[path of image file]" target=_blank>

In the pictureframe.asp, you can simply add the following asp code and the other part in the body tag.

<%
path=request.querystring("path")
%>

<body background="<%=path%>" >

This will enable you to load any image in the pictureframe.asp as a background image. I'd still prefer to use jscript if possible for this though.

traaacker

7:09 pm on Mar 6, 2006 (gmt 0)

10+ Year Member



Asp is just a Windows thing right? My server is running off unix.

I guess javascript it must be then.