PDA

View Full Version : rotating href?


bspotto
04-30-2001, 12:13 PM
I'm creating a photo gallery that has a page with two picture frames.

Inside the frames at any given time are two photos, which rotate through from a set of 20 photos (you change by clicking on forward and back arrows).

Also I want users to be able to click on any of these pictures to link to a pop up with a big version of the photo.

I succeeded in getting the pix to work using an array with a variable img src.

But I can't figure out how to make the HREFs work the same way, mainly because it seems that I can't assign a variable name to them. Is there any way to do this?

Thanks,

Brad

jhillman
05-07-2001, 12:21 PM
As far as I know, you can not assign a variable name to the HREF tag and I'm not sure actually why you would need this. Please explain in more detail if you can.

I have a javascript that I wrote that allows pictures to rotate every 5secs and when the user clicks on the picture, a full-blown one pops up in another window. If you feel this code would help you, just leave me a message and I can email it to you.

-Joe

silverdog
05-07-2001, 12:49 PM
Do you mean you want to dynamically change the value of the href attribute by assigning a php variable value to it?
if so I typically do this
<a href="<? echo $varname; ?>">blah</a>

Hope that helps