Hi,
I am coding to read 20 records from a table and show them for scrolling view. Interface has two buttons, "stop" and "start". If "stop" is hit, the scroll stops, and the opposite for "start".
The problem I have is that when this starts initially, scroll speed is too fast. But if stopped, and restarted, the speed adheres to the set value in the code.
Is there any way to make the scroll start initially with the same speed as the set value in the code?
Many thanks in advance.
---- My codes:
$db = mysql_connect("localhost", "user","password");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM mytable LIMIT 0,20",$mydb);
echo "<span dir=ltr><marquee id=\"scroller\" direction=\"up\" onMouseover=\"this.scrollAmount=0\" onMouseout=\"this.scrollAmount=1\" >";
while ($myrow = mysql_fetch_array($result)) {
echo $myrow["val1"]." and ".$myrow["val2"]."<br>";
echo $myrow["description"]."<br><br>";
}
echo "</marquee></span></p>";
echo '<a href="javascript:scroller.stop()">Stop</a> | <a href="javascript:scroller.start()">Start</a>';