drop down menu for gallery jumps??
Nir
Registered Users Posts: 1,400 Major grins
Anyone been able to implement a drop down menu on their site for jumping between galleries without 'back browsing' to parent directory?
Tried searching this forum without results.
Thanks!
Tried searching this forum without results.
Thanks!
0
Comments
Unfortunately, there isn't any easy way, you will have to hard code the listbox. Below is some sample code, which needs to be added to the Header HTML section...
<select>
<option>Select a gallery...</option>
<option onclick="javascript:window.location.href='[insert gallery URL]'">Gallery 1</option>
<option onclick="javascript:window.location.href='[insert gallery URL]'">Gallery 2</option>
</select>
Cheers,
David
SmugMug API Developer
My Photos
First of all - thanks!!
2nd - I'm going to PM you to get your attention but leave correspondence here so others can see too.
Copied your html into the HEADER (obviously inserted MY links) - it creates the pull down menu but doesn't execute a jump to the gallery chosen.
Any ideas?
<SELECT style="VISIBILITY: visible"> <OPTION selected>Select a gallery...</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/253809'">Photos that have earned recognition</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/92749'">Night Photography</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/92800'">Ireland Photography Expedition</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/169240'">Shoshana was a Jewish-Polish Grandmother</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/98050'">The Many Faces of Jerusalem</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/261241'">Ein-Kerrem</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/186083'">Crete - August 2004</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/92775'">People - My Favorite Subject</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/247880'">Mishkanot Shaananim</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/92827'">Special Moments</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/117651'">The Villiage of Abu-Gosh</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/92782'">Nature and Landscapes</OPTION> <OPTION onclick="javascript:window.location.href='http://niralon.smugmug.com/gallery/93527'">Curves and Shades</OPTION></SELECT>
Nir Alon
images of my thoughts
It looks like it's a browser compatibility issue, it works fine with Firefox but not IE. When I have a chance I will post something that works with both.
Cheers,
David
SmugMug API Developer
My Photos
[PHP]
<script type="text/javascript">
function sm_jump(objSelect){
if (objSelect.selectedIndex<=0) return false;
var objOpt = objSelect.options[objSelect.selectedIndex];
window.location.href=objOpt.value;
}
</script>
<select onChange="sm_jump(this);">
<option>Select a gallery...</option>
<option value="http://www.google.com/">Gallery 1</option>
<option value="http://www.yahoo.com/">Gallery 2</option>
</select>
[/PHP]
Just change the option values (i.e. "google/yahoo" in the example above) with your full gallery URL (including "http://")
This will work in any browser supporting javascript.
Aaron Christy
http://www.surfacedamage.com/
Nir Alon
images of my thoughts