Jeg har klippet lidt i et tidligere script jeg har lavet..
Det er lidt snusket lavet, men du må sige til hvis det skal passes bedre til
<html>
<head>
<title>
tmp_scroller
</title>
<style type="text/css">
#mainframe_dim {width: 700px; height: 370px; overflow: hidden; border-style: solid; border-width: 1px; border-color: gray;}
#mainframe_value {width: 100%; position: relative;}
</style>
<script language="javascript">
main_pos = 0;
proc = 0;
function y_scroll (retning) {
if (retning == "down") {
mainvalue_height = mainframe_value.offsetHeight;
if (mainvalue_height > 255) {
rest = main_pos + mainvalue_height;
if (rest > 228) {
main_pos = main_pos - 7;
mainframe_value.style.top = main_pos;
v_1 = (-1 * main_pos) + 228;
v_2 = mainvalue_height;
}
}
upd = setTimeout ("y_scroll('down')", 40);
}
else {
if (main_pos != 0) {
main_pos = main_pos + 7;
mainframe_value.style.top = main_pos;
v_1 = (-1 * main_pos) + 228;
v_2 = mainvalue_height;
}
upd = setTimeout ("y_scroll('up')", 40);
}
}
function stp_scroll() {
clearTimeout (upd);
}
</script>
</head>
<body>
<table cellpadding="0" cellspacing="5"><tr>
<td valign="top">
<font class="standart">
<div id="mainframe_dim">
<div id="mainframe_value">
Indhold her.
Indhold her.
Indhold her.
Indhold her.
Indhold her.
Indhold her.
</div>
</div>
</td>
<td width="55" valign="top" height="100%">
<table cellpadding="0" cellspacing="0" height="100%"><tr><td valign="top"><a href="#" onMouseOver="y_scroll('up');" onMouseOut="stp_scroll();">op</a></td></tr>
<tr><td valign="bottom"><a href="#" onMouseOver="y_scroll('down');" onMouseOut="stp_scroll();">ned</a></td></tr></table>
</td>
</tr></table>
</body>
</html>
Hvordan vil du egentlig kunne give point når du har 0 UP?
[Redigeret d. 13/03-04 18:49:02 af Simon Jensen]