SlideBar

  • Thread starter Thread starter Mike
  • Start date Start date
Hi Mike,

You might be able to find one ready-made on the Internet. You could write
your own as well. It would have to be done using JavaScript and HTML. My
guess would be that it would use Divs for the most part. The scroll "groove"
would be an image. The slider would be a div that has event handlers for
onmousedown, onmousemove, and onmouseup. It would use CSS styles and
JasvaScript to move the slider.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
Thanks Kevin.
I already did that, but i don't know how to limit the slider to the table
limits without use absolute-position.
Can u help me?
This's the HTML:

<script language="javascript">

var Dragging = false;
var CurrentControl,CurrentControlY, CurrentControlYTemp;

function OnMove()
{
if (event.button == 1 && Dragging)
{
CurrentControl.style.pixelTop = CurrentControlYTemp + event.clientY -
CurrentControlY;
return false;
}
}

function OnDrag()
{
if (!document.all)
return;
if (event.srcElement.className=="drag")
{
Dragging = true;
CurrentControl = event.srcElement;
var o = document.all.tblLalala;
CurrentControlYTemp = CurrentControl.style.pixelTop;
CurrentControlY = event.clientY;
document.onmousemove = OnMove;
}
}
</script>
.....
<body>
<table height="100%" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<table id="tblLalala" height="100%" width="15" cellpadding="0"
cellspacing="0" style="BORDER-RIGHT: 2px inset; BORDER-TOP: 2px inset;
BORDER-LEFT: 2px inset; MARGIN-RIGHT: 10px; BORDER-BOTTOM: 2px inset">
<tr height="50%">
<td bgcolor="#ffffff" align="right">
<IMG class="drag" src="images/pointer.bmp">
</td>
</tr>
<tr height="50%">
<td bgcolor="#ff0000"></td>
</tr>
</table>
</td>
</tr>
</table>

<script language="javascript">
document.onmousedown = OnDrag;
document.onmouseup = new Function("Dragging = false");
</script>

</body>
.....
 
Back
Top