Results 1 to 10 of 10

Thread: Swiss Army Image slideshow - enable Up and Back buttons

  1. #1
    Join Date
    Apr 2010
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Swiss Army Image slideshow - enable Up and Back buttons

    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.


    Code:
    
    
    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

  2. #2
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    612
    Thanks
    46
    Thanked 32 Times in 32 Posts

    Default

    Hi Glennall ,please post a url to the page with a problem
    Thanks,

    Bud

  3. #3
    Join Date
    Apr 2010
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ajfmrf View Post
    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!

  4. #4
    Join Date
    Apr 2010
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Use this modified version of the script in place of your current swissarmy.js file:

    Attachment 4265
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    glennnall (01-08-2012)

  7. #6
    Join Date
    Apr 2010
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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.

  8. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #8
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    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.

  10. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  11. The Following User Says Thank You to jscheuer1 For This Useful Post:

    mmfarmani (07-07-2012)

  12. #10
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    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.
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  13. The Following User Says Thank You to bernie1227 For This Useful Post:

    mmfarmani (07-07-2012)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •