PDA

View Full Version : Pausing up-down scroller number of item



yman
03-01-2007, 10:11 PM
1) Script Title:
Pausing up-down scroller
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex2/crosstick.htm
I want to have more than 10 item in the pausecontent array.


3) Describe problem:
in fact when If I pass pausecontent[9], i mean if I have a pausecontent[10] it doesn't want to work. how to do it please.

I mean I would like the array to be as big as 100 Or more.

Thanx for help

french webmaster.

ddadmin
03-01-2007, 10:34 PM
There's no reason why the script would stop working past 10 items. I just tested it with 10 items, and it works. If you're still having problems, please post a link to the problem page on your site.

yman
03-01-2007, 11:02 PM
I have just tested with
pausecontent[10]
from 0 to 10

it doesnt work

a link?
http://www.negoce-land.com/abc-negoce/




<script type="text/javascript">var pausecontent=new Array()
pausecontent[0]='<div align="center"><a href="achat/produit_details.php?id=20"><font class="normal">IBM THINKPAD T30</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_260107_114113" alt="IBM THINKPAD T30" width="120" border="0"/></div><br /><div align="right"><font class="normal" >425.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[1]='<div align="center"><a href="achat/produit_details.php?id=21"><font class="normal">IBM THINKPAD T23</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_260107_112650" alt="IBM THINKPAD T23" width="120" border="0"/></div><br /><div align="right"><font class="normal" >390.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[2]='<div align="center"><a href="achat/produit_details.php?id=22"><font class="normal">ULTRA-PORTABLE DELL LATITUDE C400</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_260107_112404" alt="ULTRA-PORTABLE DELL LATITUDE C400" width="120" border="0"/></div><br /><div align="right"><font class="normal" >375.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[3]='<div align="center"><a href="achat/produit_details.php?id=23"><font class="normal">MEDION CAD2000</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_260107_111844" alt="MEDION CAD2000" width="120" border="0"/></div><br /><div align="right"><font class="normal" >670.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[4]='<div align="center"><a href="achat/produit_details.php?id=24"><font class="normal">HP / COMPAQ NX6110</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_260107_110050" alt="HP / COMPAQ NX6110" width="120" border="0"/></div><br /><div align="right"><font class="normal" >690.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[5]='<div align="center"><a href="achat/produit_details.php?id=25"><font class="normal">MEMOIRE SODIMM 256 MO SDRAM PC133</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_140123" alt="MEMOIRE SODIMM 256 MO SDRAM PC133" width="120" border="0"/></div><br /><div align="right"><font class="normal" >35.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[6]='<div align="center"><a href="achat/produit_details.php?id=26"><font class="normal">MEMOIRE SODIMM 256 MO DDR PC2100</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_141959" alt="MEMOIRE SODIMM 256 MO DDR PC2100" width="120" border="0"/></div><br /><div align="right"><font class="normal" >33.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[7]='<div align="center"><a href="achat/produit_details.php?id=27"><font class="normal">MEMOIRE SDRAM 128 MO PC100</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_145517" alt="MEMOIRE SDRAM 128 MO PC100" width="120" border="0"/></div><br /><div align="right"><font class="normal" >19.90&euro;</a></font>&nbsp;</div><br />'
pausecontent[8]='<div align="center"><a href="achat/produit_details.php?id=28"><font class="normal">MEMOIRE SDRAM 64 MO PC100</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_144416" alt="MEMOIRE SDRAM 64 MO PC100" width="120" border="0"/></div><br /><div align="right"><font class="normal" >9.90&euro;</a></font>&nbsp;</div><br />'
pausecontent[9]='<div align="center"><a href="achat/produit_details.php?id=29"><font class="normal">MEMOIRE SDRAM 256 Mo PC100</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_150056" alt="MEMOIRE SDRAM 256 Mo PC100" width="120" border="0"/></div><br /><div align="right"><font class="normal" >39.90&euro;</a></font>&nbsp;</div><br />'
pausecontent[10]='<div align="center"><a href="achat/produit_details.php?id=30"><font class="normal">DISQUE DUR 3,5'' IDE 80.1 GB</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_260107_102052" alt="DISQUE DUR 3,5'' IDE 80.1 GB" width="120" border="0"/></div><br /><div align="right"><font class="normal" >65.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[11]='<div align="center"><a href="achat/produit_details.php?id=31"><font class="normal">MEMOIRE SODIMM 128 MO SDRAM PC100</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_260107_104206" alt="MEMOIRE SODIMM 128 MO SDRAM PC100" width="120" border="0"/></div><br /><div align="right"><font class="normal" >24.90&euro;</a></font>&nbsp;</div><br />'
pausecontent[12]='<div align="center"><a href="achat/produit_details.php?id=32"><font class="normal">MEMOIRE SODIMM 128 MO SDRAM PC133</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_165735" alt="MEMOIRE SODIMM 128 MO SDRAM PC133" width="120" border="0"/></div><br /><div align="right"><font class="normal" >27.50&euro;</a></font>&nbsp;</div><br />'
pausecontent[13]='<div align="center"><a href="achat/produit_details.php?id=33"><font class="normal">MEMOIRE SODIMM 256 MO SDRAM PC100</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_165131" alt="MEMOIRE SODIMM 256 MO SDRAM PC100" width="120" border="0"/></div><br /><div align="right"><font class="normal" >39.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[14]='<div align="center"><a href="achat/produit_details.php?id=34"><font class="normal">DISQUE DUR 3,5'' IDE 40.1 GB</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_172223" alt="DISQUE DUR 3,5'' IDE 40.1 GB" width="120" border="0"/></div><br /><div align="right"><font class="normal" >35.55&euro;</a></font>&nbsp;</div><br />'
pausecontent[15]='<div align="center"><a href="achat/produit_details.php?id=35"><font class="normal">DISQUE DUR 3,5'' IDE 20.1 GB</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_173341" alt="DISQUE DUR 3,5'' IDE 20.1 GB" width="120" border="0"/></div><br /><div align="right"><font class="normal" >29.95&euro;</a></font>&nbsp;</div><br />'
pausecontent[16]='<div align="center"><a href="achat/produit_details.php?id=36"><font class="normal">DISQUE DUR 3,5'' IDE 10.1 GB</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_240107_174540" alt="DISQUE DUR 3,5'' IDE 10.1 GB" width="120" border="0"/></div><br /><div align="right"><font class="normal" >19.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[17]='<div align="center"><a href="achat/produit_details.php?id=37"><font class="normal">CARTES MERES RECENTES: 939/478B/754/462/BAREBONE</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_280107_161456" alt="CARTES MERES RECENTES: 939/478B/754/462/BAREBONE" width="120" border="0"/></div><br /><div align="right"><font class="normal" >0.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[18]='<div align="center"><a href="achat/produit_details.php?id=38"><font class="normal">test de metatag</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/" alt="test de metatag" width="120" border="0"/></div><br /><div align="right"><font class="normal" >12121211.00&euro;</a></font>&nbsp;</div><br />'
pausecontent[19]='<div align="center"><a href="achat/produit_details.php?id=39"><font class="normal">IMPRIMANTE LASER COLOR HP</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/" alt="IMPRIMANTE LASER COLOR HP" width="120" border="0"/></div><br /><div align="right"><font class="normal" >100.00&euro;</a></font>&nbsp;</div><br />'
</script>

ddadmin
03-02-2007, 11:09 AM
Firstly, you probably will want to remove or edit this external .js file on your page:


<script type="text/javascript" src="test_files/textclin_pub.js"></script>

It's throwing a JS error every second, in Firefox at least.

Back to your issue, the problem is due to your 10th item (and some others following it) containing single quotes that aren't backslashed. Since each item uses single quotes to enclose the message, any single quotes that appear within need to be backslashed. So for example:


pausecontent[10]='<div align="center"><a href="achat/produit_details.php?id=30"><font class="normal">DISQUE DUR 3,5\'\' IDE 80.1 GB</font></div><br /><div align="center"><img src="http://www.negoce-land.com/abc-negoce/upload/NEGOCE-LAND.COM_260107_102052" alt="" width="120" border="0"/></div><br /><div align="right"><font class="normal" >65.00&euro;</a></font>&nbsp;</div><br />'

I may have missed others in this item, but basically, you need to do this for all single quotes, which also appear in some items following the 10th one above.