Results 1 to 2 of 2

Thread: Pausing scroller on DD example shows 2 scrollers

  1. #1
    Join Date
    Sep 2011
    Location
    MD
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pausing scroller on DD example shows 2 scrollers

    http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

    That's the link of the scroller I'm using.

    I use only the first example of the two. It works fine, and is just what I needed.


    But now, I'd like to put the second example, on a completely different part of the page, but it won't show up, if I try to move the pausescroller2 line away 'too far', from the bottom of the code where it is.

    Please see the <body> portion of the code here:

    Code:
    <script type="text/javascript">
    
    //new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)
    
    new pausescroller(pausecontent, "pscroller1", "someclass", 3000)
    document.write("<br />")
    new pausescroller(pausecontent2, "pscroller2", "someclass", 2000)
    
    </script>
    What is the <br /> all about, and why isn't there one after the next line as well?

    Why also am I having trouble placing that second line on another part of the page where I want to use new instance of pausescroller2 ?
    Last edited by jscheuer1; 11-21-2011 at 03:43 AM. Reason: Format

  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

    In a way, that br is the thing. It's only there to separate the two demo scrollers.

    It could just as easily have been:

    Code:
    <script type="text/javascript">
    
     //new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)
    
     new pausescroller(pausecontent, "pscroller1", "someclass", 3000)
    
    </script>
    
    <br />"
    
    <script type="text/javascript">
    
     new pausescroller(pausecontent2, "pscroller2", "someclass", 2000)
    
    </script>
    And therein lies your answer. Now the two scrollers are truly separate. You can put the second one wherever you like.
    - John
    ________________________

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

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
  •