Results 1 to 3 of 3

Thread: Show file name being displayed

  1. #1
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Show file name being displayed

    1) Script Title: Reel Slideshow

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...lslideshow.htm

    3) Describe problem: How to display the file name of the picture being shown.

    I would like to display the name of the file being shown in the slide in a label. I confirm that I sincerely searched for anyone who has asked for this solution but couldn't find any. Request help please..

    Thanks,
    Sen

  2. #2
    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 (right click and 'Save As'):

    reelslideshow_mod.js

    That allows you to add this (highlighted) to your on page init:

    Code:
    <script type="text/javascript">
    
    var firstreel=new reelslideshow({
    	wrapperid: "myreel", //ID of blank DIV on page to house Slideshow
    	dimensions: [300, 200], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["http://i26.tinypic.com/11l7ls0.jpg"], //["image_path", "optional_link", "optional_target"]
    		["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new"],
    		["http://i30.tinypic.com/531q3n.jpg"],
    		["http://i31.tinypic.com/119w28m.jpg"] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2000, cycles:2, pauseonmouseover:true},
    	onslide: function(){
    			jQuery('#imagename').html(this.setting.imagearray[this.curslide][0].replace(/^(.*\/|)([^\.]*)\.[^\.]*$/, '$2'));
    		},
    	orientation: "h", //Valid values: "h" or "v"
    	persist: true, //remember last viewed slide and recall within same session?
    	slideduration: 300 //transition duration (milliseconds)
    })
    
    </script>
    Notice the red id imagename, it will find an element on the page with an id of imagename and put the filename in there each time the slideshow slides. You can put that element anywhere you like. For example:

    Code:
    <div id="myreel"></div>
    
    <div class="paginate">
    = <a href="javascript:firstreel.navigate('back')" style="margin-right:200px;">back</a>  <a href="javascript:firstreel.navigate('forth')">forth</a> =<br>
    <span id="imagename">11l7ls0</span>
    </div>
    Notice that I've put the first filename in there (in green) so that it won't be empty while the slideshow and page are loading.

    The browser cache may need to be cleared and/or the page refreshed to see changes.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

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

    sendil77 (09-22-2012)

  4. #3
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    Works like charm. Thanks for the help. Really amazed by the speed of resolution. Will surely recommend this forum to my friends..

    Thanks,
    Sen

Similar Threads

  1. PHP randomizer show file and filename
    By Feldt in forum Looking for such a script or service
    Replies: 5
    Last Post: 07-24-2008, 11:41 PM
  2. problem in show swf file randomly
    By sandra in forum JavaScript
    Replies: 8
    Last Post: 05-29-2007, 12:05 PM
  3. show a part of an xml file in html
    By queerfm in forum HTML
    Replies: 3
    Last Post: 02-03-2007, 04:03 PM
  4. Flash File Won't Show In Safari
    By tomyknoker in forum Flash
    Replies: 2
    Last Post: 02-02-2007, 09:17 PM
  5. Replies: 0
    Last Post: 07-15-2005, 11:50 AM

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
  •