a gallery. I would like to make a direct link to a certain starting point,
while have just one gallery
http://www.sitename.com/galleryPage.htm?startCategory=home
http://www.sitename.com/galleryPage.htm?startCategory=work
http://www.sitename.com/galleryPage.htm?startCategory=car
I this possible?
Answer
Yes, it's possible, in the version 1.4.2 or higher.
Assign Category name to each folder in the Gallery User Interface in
Dreamweaver.
Add this code to the end of the page with the WebStunning photo gallery:
<script type="text/javascript">
function parseGetVars() {
var ar = new Array();
var q = unescape(top.location.search.substring(1));
var pairs = q.split(/\&/);
for (var i=0;pairs[i];i++) {
var nv = pairs[i].split(/\=/);
ar[nv[0]] = nv[1];
}
return ar;
}
function startWhenReady(){
var wso = swfobject.getObjectById('WSgallery');
if(document.readyState){
if(document.readyState=="complete" && wso.GetVariable("readystate")=="ready"){
wso.JS_startCategory(stCat);
}else{
setTimeout("startWhenReady()",200);
}
}else{
if(wso && wso.GetVariable("readystate")=="ready"){
wso.JS_startCategory(stCat);
}else{
setTimeout("startWhenReady()",200);
}
}
}
var gVars = parseGetVars();
var stCat = gVars['startCategory'];
if(stCat)startWhenReady();
</script>
No comments:
Post a Comment