PDA

View Full Version : Pausing scroller on DD example shows 2 scrollers



Chimbo
11-21-2011, 02:15 AM
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:


<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 ?

jscheuer1
11-21-2011, 03:43 AM
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:


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