Results 1 to 5 of 5

Thread: Multiple Simply Controls galleries won't display

  1. #1
    Join Date
    Jan 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Multiple Simply Controls galleries won't display

    1) Script Title: Simply Controls galleries

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

    3) Describe problem: I can have on gallery working fine on a page (except an error does appear, saying it can't find the div it should, but it does find the div, so I don't think thats part of the problem). When I try and add a second, a black box appears where the second gallery should be. I had a little bit of a hard time understanding the instructions on how to make multiple, so could someone please help out?
    thanks. here is the script I'm using now:
    HTML Code:
    <script type="text/javascript">
    
    var mygallery=new simpleGallery({
    	wrapperid: "bombardier-f18", //ID of main gallery container,
    	dimensions: [222, 135], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
    	imagearray: [
    		["youtube/b/f18-1.png", "", ""],
    		["youtube/b/f18-2.png", "", ""],
    		["youtube/b/f18-3.png", "", ""],
    	],
    	autoplay: true,
    	persist: false,
    	pause: 2500, //pause between slides (milliseconds)
    	fadeduration: 500, //transition duration (milliseconds)
    	oninit:function(){ //event that fires when gallery has initialized/ ready to run
    	},
    	onslide:function(curslide, i){ //event that fires after each slide is shown
    		//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
    		//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
    	}
    })
    
    
    </script>
    <script type="text/javascript">
    
    var mygallery2=new simpleGallery({
    	wrapperid: "bombardier-crj", //ID of main gallery container,
    	dimensions: [222, 135], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
    	imagearray: [
    		["youtube/b/crj-1.png", "", ""],
    		["youtube/b/crj-2.png", "", ""],
    		["youtube/b/crj3.png", "", ""],
    	],
    	autoplay: true,
    	persist: false,
    	pause: 2500, //pause between slides (milliseconds)
    	fadeduration: 500, //transition duration (milliseconds)
    	oninit:function(){ //event that fires when gallery has initialized/ ready to run
    	},
    	onslide:function(curslide, i){ //event that fires after each slide is shown
    		//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
    		//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
    	}
    })
    </script>
    Last edited by mb94; 01-26-2009 at 09:55 PM.

  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

    There should be no comma here:

    Code:
    ["youtube/b/f18-3.png", "", ""],
    or here:

    Code:
    ["youtube/b/crj3.png", "", ""],
    But that's only a problem for IE. Otherwise the script code looks OK. There is more to this than just the initialization though. If you want more help, we would need to see the page:

    Please post 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. #3
    Join Date
    Jan 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    http://mm-air.axspace.com/videos.htm
    then open the middle tab called "Mitch B"
    thanks

  4. #4
    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

    Not a problem in IE or Opera. But in Firefox, yes - just what you describe. You should validate your page to HTML 4.01 strict. However, just moving this (highlighted):

    Code:
     . . . ction writecontent(page_request){
    if (window.location.href.indexOf("http")==-1 || page_request.status==200)
    document.write(page_request.responseText)
    }
    
    </script>
    
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>M&amp;M Air | Media</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="styles.css" rel="stylesheet" type="text/css" media="screen" />
    <style type="text/css">
    .style2 {
    	text-align: center;
    } . . .
    to it's more or less proper spot in the code, here:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>M&amp;M Air | Media</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    
    <script type="text/javascript" src="codes/jquery-1.2.6.pack.js"></script>
    
    <style type="text/css">
    
    /*Make sure your page contains a valid doctype at the top*/
    #simplegallery1{ //CSS for  . . .
    will take care of the problem.
    - John
    ________________________

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

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

    mb94 (01-26-2009)

  6. #5
    Join Date
    Jan 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks heaps, It works now

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
  •