PDA

View Full Version : Step carousel Question



evan5
05-01-2009, 02:17 AM
Hi have implemented a rotating step carousel onto my website. Recently I tried to add another one right under the first one(with different pics), just copied and pasted the first carousels script, but for some reason, the second carousel wont rotate as it should.

ANyone have any insight? Heres the code below, you are my hero if u figure it out!


<body>
<script language="JavaScript">
<!--

var message="";
///////////////////////////////////
function clickIE()

{if (document.all)
{(message);return false;}}

function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
<div class="img">
<a href="width="820" height="155"></a>
</div>
<h4></h4>

<table class="two" border="0" width="10%">
<tr>
<td width="5%"><a href="home.html">Dash</a></td>
<td width="8%"><a href="partners.html">Invest</a></td>
</tr>
</table>

<hr />




<table border="0" width="100%" cellpadding="0">
<tr>

<td width="20%" valign="top">

</td>




<td width="60%" valign="top" style="background-color:#1C1D1C">

<script type="text/javascript">

stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:true, moveby:1, pause:3000},
panelbehavior: {speed:700, wraparound:false, persist:true},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
})

</script>

<div id="mygallery" class="stepcarousel">
<div class="belt">

<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
</div>
</div>


<hr />

<script type="text/javascript">

stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:true, moveby:1, pause:3000},
panelbehavior: {speed:700, wraparound:false, persist:true},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
})

</script>

<div id="mygallery" class="stepcarousel">
<div class="belt">

<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
<div class="panel">

</div>
</div>
</div>



</td>



<td width="20%" valign="top">

</td>

</tr>
</table>

<div style="color: pink;display: inline;float: left;font-family: times new roman;font-size: 10pt">

</div>

<div style="display: inline;float: right;">
<a href="javascript:window.external.AddFavorite('http://www,nudelagoon.com', 'NudeLagoon')" ></a>
</div>


<td width="1%" valign="top" bgcolor="pink">
</td>

</tr>
</table>



</body>











</html>

Snookerman
05-01-2009, 06:13 AM
As you can see now that I highlighted your code, everything is green after this line because of the highlighted error:

<a href="width="820" height="155"></a>
Fix that first and try to validate your code (http://validator.w3.org/) to make sure you don't have any other syntax errors.

evan5
05-02-2009, 03:52 AM
thanks snookerman!
I will try to fix that, i never tried validating my code before