PDA

View Full Version : Pausing up-down Scroller duplicate problem



tanicos
05-05-2008, 01:37 AM
1) Script Title: Pausing up-down Scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

3) Describe problem: hello i am trying to add this on an OSC shopping cart..how can i create 2 instances of this? i tried on the second one with
var pausecontent2=new Array()
pausecontent2[0] and so on but it won't work..any help please?
the first one reads the products from the database while the second one displays normal images...when i add them both on separate files the 1st one is on the 2nd instance too..thank you

ddadmin
05-05-2008, 05:16 AM
You should have no problem getting multiple instances of the script running on the same page (as seen in the demo on the script page, which shows 2 instances). Your two content arrays may look something like:


var pausecontent=new Array()
pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!'
pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.'
pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'

var pausecontent2=new Array()
pausecontent2[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>'
pausecontent2[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>'
pausecontent2[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'

While your two initialization codes may look like:


new pausescroller(pausecontent, "pscroller1", "someclass", 3000)

new pausescroller(pausecontent2, "pscroller2", "someclass", 2000)