Results 1 to 5 of 5

Thread: Running two C Motion scripts!

  1. #1
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Post Running two C Motion scripts!

    1) Script Title: C Motion

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

    3) Describe problem:

    How do i make 2 of these scripts run on the same page at the same time?

    Sidenote: not compatible with Firefox 3.
    Last edited by Beta Cygni; 11-03-2008 at 04:35 AM.

  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

    What do you mean, "not compatible with Firefox 3"? The demo page works fine in FF 3 here. Anyways, you would need to use an object oriented version of the script like:

    http://home.comcast.net/~jscheuer1/s...cmotion_oo.htm

    Use your browser's 'view source' to get the code.
    - 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:

    Beta Cygni (11-04-2008)

  4. #3
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Post

    is there a way to have the image content (<a href="#"><img src="photo5.jpg" border="1"></a>) in the html file? I have many many of these and also seprate galleries that go page by page.

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

    One of the nice things about this and many object oriented scripts is that nothing much happens until the onpage call. So yes, you can put your array(s) right on the page, ex:

    HTML Code:
    <script type="text/javascript">
    
    var gallery2=new Array();
     // Use a space character between each image for this gallery? (use 1 for yes, 0 for no):
    gallery2.usespace=0;
     //define gallery's image train:
    gallery2[0]='<a href="photo9_lrg.jpg" onclick="return enlargeimage(this.href, 319, 494);"><img src="photo9.jpg" alt="" border="1"><\/a>';
    gallery2[1]='<a href="photo8_lrg.jpg" onclick="return enlargeimage(this.href, 335, 577);"><img src="photo8.jpg" alt="" border="1"><\/a>';
    gallery2[2]='<a href="http://www.dynamicdrive.com"><img src="photo7.jpg" alt="" border="1"><\/a>';
    gallery2[3]='<a href="#"><img src="photo6.jpg" alt="" border="1"><\/a>';
    gallery2[4]='<a href="#"><img src="photo5.jpg" alt="" border="1"><\/a>';
    gallery2[5]='<a href="#"><img src="photo4.jpg" alt="" border="1"><\/a>';
    gallery2[6]='<a href="#"><img src="photo3.jpg" alt="" border="1"><\/a>';
    gallery2[7]='<a href="#"><img src="photo2.jpg" alt="" border="1"><\/a>';
    gallery2[8]='<a href="#"><img src="photo1.jpg" alt="" border="1"><\/a>';
    
    new cmotiongallery(gallery2, 6, 7, 1000, 1, 500, 225)
    </script>
    Just take note that the / in </a> should be escaped <\/a> as shown above. This is only really required (as far as I've ever seen) for validation purposes, but is also considered prudent because some browsers might require it for script code of this type on an HTML page.
    - 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:

    Beta Cygni (11-05-2008)

  7. #5
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question

    these solutions work however when i load them into a DHTML window the gallery doesn't scroll i have to manually refresh that window for the gallery to work. Have i done something wrong?

    Ive tried both methods of putting the script in the html and in the jscript.

    example here click on weddings (top of menu)

    vs

    example 2 here (root page)

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
  •