📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

can anyone assist with modding this javacript slideshow behaviour?

Options
The folk who do the scripting for our website are on holiday for some weeks, plus they are quoting what I think to be a high price for a minor mod to our javascript, eg £50 to £60.

I want to improve the slide-show for example on this page:
http://www.bb-china.com/book-online/html_pages/pid8_english.html

Currently you have to mouse over the chevrons at the edges of the slides to make it move.

1. Ideally, I'd like it to execute a slide-to-the right of the images automatically once the page has loaded. Surely this is a small change? I tried adding onload="move_right();" but cannot find the right place to insert it to make it work.

2. Eventually I'd like to change it so that it's a permanently moving conveyor belt of images. Then if you mouse over the images they stop moving and clicking an image pops it up larger (as now). Surely this small change to the below template script?

Any suggestions for a fix, even a 'quick and dirty' one, would be appreciated!


Details:
======
The below script is loaded in from a template. I can edit this template but the page itself gets generated (so I cannot easily control what comes just after the "body" tag - it is possible to edit the generated page per the link above manually though not so convenient).

<td align="center">
<table width=500px cellpadding=0 cellspacing=0 style='height:102px' class=configuration >
<tr>
<td width="10px" valign="top" class='red'></td>
<td width=10px style='' align=center rowspan=2 valign="middle">
<span style='color:yellow;cursor:pointer' onmouseOver="move_left();" onMouseOut="clearTimeout(tid)">«</span>
</td>
<td rowspan=3 valign="middle"><div id=container style='break:none;width:810;overflow:hidden;clip:0 97 810 0;height:97px;position:relative'><div id=prod style='position:relative;left:0px;'><%picture_multiple2%></div></div></td>
<td width=10px style='' align=center rowspan=2 valign="middle">
<span style='color:yellow;cursor:pointer' onmouseOver="move_right();" onMouseOut="clearTimeout(tid)">»</span>
</td>
<td width="10px" valign="top" align=right class='red'></td>
</tr>
<tr>
<td align=left class='red' valign="bottom"><img src='tpl/visit/redstyle/images/x_ld.gif'></td>
<td align=right class='red' valign="bottom"><img src='tpl/visit/redstyle/images/x_rd.gif'></td>
</tr>
</table>
</td>

And further down the template:

function move_right()!!
var c=document.getElementById('prod');
var d=document.getElementById('container');

if (parseInt(c.style.left)+gCW(c)>d.offsetWidth)!!

c.style.left=parseInt(c.style.left)-2;
tid=setTimeout("move_right()",1);
}
}
function move_left()!!
var c=document.getElementById('prod');
var d=document.getElementById('container');

if (parseInt(c.style.left)<0)!!

c.style.left=parseInt(c.style.left)+2;
tid=setTimeout("move_left()",1);
}

Comments

This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351.1K Banking & Borrowing
  • 253.2K Reduce Debt & Boost Income
  • 453.6K Spending & Discounts
  • 244.1K Work, Benefits & Business
  • 599.1K Mortgages, Homes & Bills
  • 177K Life & Family
  • 257.5K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.