PDA

View Full Version : Photo Album script v2.0



bassman
08-07-2008, 06:42 PM
1) Script Title: Photo Album script v2.0

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

3) Describe problem: Is it possible to take out (delete) the numbers on the navigation links (highlighted yellow color)? My goal is to have it navigate with images and not numbers.

I was able to add a background image of a grey bullet for the 1st set of pics, and a background image of a white bullets for the 2nd and 3rd set not clicked on. But I cant delete the numbers from the navigation. It happens automatically. Finally i cheated and turned them white and added padding to the top to get rid of them, but I know this isn't the right way.

Can someone help me, my head's gonna explode!!

jscheuer1
08-08-2008, 02:34 AM
There is nothing wrong with the way you did it. However, an idle swipe of that area with the mouse button depressed could highlight the now 'invisible' numbers. Here is where in the script that the text I believe you wish to eliminate is generated:


photogallery.prototype.createNav=function(gdiv, pdiv , ptext){
var instanceOfGallery=this
var navHTML=""
for (var i=0; i<this.pagecount; i++)
navHTML+='<a href="#navigate" rel="'+i+'">'+ptext[1]+(i+1)+'</a> ' //build sequential nav links
pdiv.innerHTML=ptext[0]+' '+navHTML
var navlinks=pdiv.getElementsByTagName("a")
navlinks[0].className="current" //Select first link by default
this.previouspage=navlinks[0] //Set previous clicked on link to current link for future ref
for (var i=0; i<navlinks.length; i++){
navlinks[i].onclick=function(){
instanceOfGallery.previouspage.className="" //"Unhighlight" last link clicked on...
this.className="current" //while "highlighting" currently clicked on flatview link (setting its class name to "selected"
instanceOfGallery.showpage(gdiv, this.getAttribute("rel"))
instanceOfGallery.previouspage=this //Set previous clicked on link to current link for future ref
return false
}
}
}

Let's zoom in on that line:


navHTML+='<a href="#navigate" rel="'+i+'">'+ptext[1]+(i+1)+'</a> ' //build sequential nav links

If you want no text there, you could make it:


navHTML+='<a href="#navigate" rel="'+i+'">&nbsp;</a> ' //build sequential nav links

bassman
08-08-2008, 02:25 PM
Got it! Thanks so much John. Looks beautiful. =)