PDA

View Full Version : Use buttons instead of Text Links in PHP Photo Album v2.11



hvirdi
04-04-2011, 01:55 PM
1) Script Title:
PHP Photo Album v2.11

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...photoalbum.htm

3) Describe problem:
Can I use Buttons instead of the "Page 1, page 2, page 3" text links at the bottom to see the next set of pictures?

I changed the code in the js file, the buttons are showing but not going to the next page (#Page2 and so on) when clicked on, but when I change back to Text links (Page '+i+'), the script works.

I know the "i+i" is only for the visitor to see the page number, but for some reason the button links are not working.

I searched the forums as well but didn't find anything. Any help would be greatly appreciated.

Thanks!

ddadmin
04-04-2011, 10:32 PM
Well, the following line inside the .js file is responsible for outputting the text links:


document.write('<a href="#Page' + i+ '" rel="'+i+'">Page'+i+'</a> ')

To change them to image links, you can simply modify the above to ouput the appropriate HTML, for example:


document.write('<a href="#Page' + i+ '" rel="'+i+'"><img src="button' + i + '.gif" /></a> ')

This would cause the script to use the buttons with file names button1.gif, button2.gif, etc as the navigational links.

hvirdi
04-06-2011, 01:37 PM
No that didn't work either. Sorry & Thanks!