control horizontal scrolling

P

Pif

Hello, in my webapp, I''ve a long timebar that needs an horizontal
scrolling. In this bar there are past and futur events. In current
stage of my page, the scrolling is initialized in the left position. I
would like to visualize current date in the bar at page start...

so do you know if there are solution ? using "%" or "px" position, or
using anchors on current date for example ?

Thanks a lot.
 
L

Laser Lips

Hello, in my webapp,  I''ve a long timebar that needs an horizontal
scrolling. In this bar there are past and futur events. In current
stage of my page, the scrolling is initialized in the left position. I
would like to visualize current date in the bar at page start...

so do you know if there are solution ? using  "%" or "px" position, or
using anchors on current date for example ?

Thanks a lot.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
<div id='test' style='height:200px;width:200px;border:1px solid
black;overflow:scroll'>
<br/
THIS_IS_SOME_LONG_TEXT_THIS_IS_SOME_LONG_TEXT_THIS_IS_SOME_LONG_TEXT
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
<script style='text/javascript'>
var div=document.getElementById("test");
</script>
<button onclick='alert(div.scrollWidth);'>Full Scroll Width</button>
<button onclick='alert(div.scrollHeight);'>Full Scroll Height</
button>
<button onclick='div.scrollTop=div.scrollHeight;'>Scroll to bottom</
button>
<button onclick='div.scrollTop=0;'>Scroll to top</button>
<button onclick='alert(div.scrollTop);'>Get Current position</button>
</BODY>
</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top