PDA

View Full Version : Swiss Army Image slideshow - enable Up and Back buttons



glennnall
01-08-2012, 12:25 AM
i've installed Swiss Army Image slideshow and for the most part i like it a lot - i'm a little disappointed that i can't make the Up and Back buttons enabled unless the pause button is active.

i found one way to turn off the 'disabled', but then the Back button doesn't work right. i'm not that good with js, could someone show me how i can accomplish this?

i've just tossed in some snippets that i think might be involved for this and not the entire js sheet... i'll gladly post the whole javascript file if necessary - i've been working on this for WAY too long and really need some help.







inter_slide.prototype.controls=function(){
var brs=this.addbr? '<br>' : ' &nbsp;';
if(!this.ics&&!this.no_c)
document.write('<div align="left" style="float:left; width:140px;"><input id="prev'+this.issid+'" type="button" value=" << " onclick="iss['+this.issid+'].changeimg(false, \'nav\');">\n'+
(this.no_auto? '&nbsp;&nbsp;&nbsp;' : ' <input id="gostp'+this.issid+'" type="button" value=" Stop " onclick="iss['+this.issid+'].gostop(this);">\n')+
' <input id="next'+this.issid+'" disabled type="button" value=" >> " onclick="iss['+this.issid+'].changeimg(true, \'nav\');">'+(this.jumpto? brs+'Jump to: <input disabled type="text" size="'+this.imgs.length.toString().length+'" id="goto'+this.issid+'" onkeydown="iss['+this.issid+'].jumper(event);"><input id="go'+this.issid+'" disabled type="button" onclick="iss['+this.issid+'].jumper();" value="GO">' : '')+'<\/div>')
else if(this.ics&&!this.no_c){
var op=document.body.filters? ' style="filter:alpha(opacity=100);"' : ' style="opacity:'+(this.man_start? 0.99 : 0.99)+';"';
document.write('<table align="center" cellpadding="0" cellspacing="10"><tr><td valign="middle" align="center" style="padding:2px 2px 1px 2px;"><input'+op+' onmouseover="iss['+this.issid+'].ibute(this,1);" onmouseout="iss['+this.issid+'].ibute(this,2);" onmousedown="iss['+this.issid+'].ibute(this,3);" onmouseup="iss['+this.issid+'].ibute(this,4);" type="image" title="Previous" id="prev'+this.issid+'" src="'+previmg+'" onclick="iss['+this.issid+'].changeimg(true, \'nav\'); this.blur();"><\/td>'+(this.no_auto? '<td>&nbsp;<\/td>' : '<td valign="middle" align="center" style="padding:2px 2px 1px 2px;"><input onmouseover="iss['+this.issid+'].ibute(this,1);" onmouseout="iss['+this.issid+'].ibute(this,2);" onmousedown="iss['+this.issid+'].ibute(this,3);" onmouseup="iss['+this.issid+'].ibute(this,4);" title="Stop" type="image" id="gostp'+this.issid+'" src="'+(this.g_fPlayMode? playimg : stopimg)+'" onclick="iss['+this.issid+'].gostop(this); this.blur();"><\/td>')+'<td valign="middle" align="center" style="padding:2px 2px 1px 2px;"><input'+op+' onmouseover="iss['+this.issid+'].ibute(this,1);" onmouseout="iss['+this.issid+'].ibute(this,2);" onmousedown="iss['+this.issid+'].ibute(this,3);" onmouseup="iss['+this.issid+'].ibute(this,4);" type="image" title="Next" id="next'+this.issid+'" src="'+nextimg+'" onclick="iss['+this.issid+'].changeimg(true, \'nav\'); this.blur();"><\/td><\/tr><\/table>\n');
}
else
this.no_c=1;
}

/////////////////////////////////////



inter_slide.prototype.buttons=function(bool){
if(this.no_c)
return;
var next=this.go('next'+this.issid), prev=this.go('prev'+this.issid);
// next.disabled=prev.disabled=!bool;
next.title=bool? 'next' : '';
prev.title=bool? 'previous' : '';
if(this.jumpto&&!this.ics)
this.go('go'+this.issid).disabled=this.go('goto'+this.issid).disabled=!bool;
if(this.ics){
if(!this.no_auto){
var go=this.go('gostp'+this.issid)
go.title=bool? 'Play' : 'Stop';
go.src=bool? playimg : stopimg;
}
if(prev.filters&&prev.parentNode)
prev.parentNode.style.filter=next.parentNode.style.filter='alpha(opacity='+(bool? 100 : 100)+')';
else if(prev.style.opacity&&!prev.filters)
prev.style.opacity=next.style.opacity=bool? 0.99 : 0.99;
}
}







i thank you much,

GN

ajfmrf
01-08-2012, 01:24 AM
Hi Glennall ,please post a url to the page with a problem

glennnall
01-08-2012, 01:34 AM
Hi Glennall ,please post a url to the page with a problem


http://cssphpmysql.com/dev/westermancm/library2.html

the Up and Back buttons are disabled unless the Stop button is pressed.

thanks much!

glennnall
01-08-2012, 02:11 AM
i have a maniac client who's about to screw me because of this one single feature - can someone please show me how to enable these buttons by default?

jscheuer1
01-08-2012, 05:46 AM
Use this modified version of the script in place of your current swissarmy.js file:

4265

glennnall
01-08-2012, 05:59 AM
you have NO idea how much help you've been, John. i'm looking through the file and look forward to maybe learning a thing or two.

you have got one major pain in the arse client off mine. thanks so much.

jscheuer1
01-08-2012, 06:27 AM
You're welcome. I'm not sure how much you can learn from the script. It's fairly old and more convoluted than necessary, though it has some nice features, especially the incremental preload.

I only fully modified the image buttons, so if you revert to the the default buttons and need help getting them to behave, let me know.

mmfarmani
07-06-2012, 02:09 PM
Hello Mr. John, I tried to download your js file but I got a big red alarm and a message saying:
The publisher of swissarmy_nd.js couldn’t be verified.
Please…, how can I download your file for my use? I really need it on my WebPages.

jscheuer1
07-06-2012, 05:03 PM
Take a chance and download it anyway. You can always run it through your anti-virus/anti-malware software before using it if you like.

bernie1227
07-07-2012, 07:54 AM
you can just bypass that, those kind of publisher verification things can be a bit touchy, there should be a button saying 'download the file anyway' or 'what's the risk?' just click whichever one and it should let you download it.