By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,246 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,246 IT Pros & Developers. It's quick & easy.

Scrollbars within HTML

P: n/a
Hi,

Is there a way to add a scrollbar within a html file, just like
buttons and other form items.

I want it to invoke an applet function every time a scrolling event
occurs.

Thank you,
Siamak
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Siamak wrote:
Hi,

Is there a way to add a scrollbar within a html file, just like
buttons and other form items.
No - although I suppose you could make some attempt at shoving too much
content into a suitably styled container.
I want it to invoke an applet function every time a scrolling event
occurs.


With the greatest of respect: no you don't.

What are you really trying to achieve?

--
William Tasso - http://WilliamTasso.com
Jul 20 '05 #2

P: n/a
Siamak wrote:

Is there a way to add a scrollbar within a html file, just like
buttons and other form items.

You can use CSS with overflow: scroll applied to a <div> in your HTML.
Real question, as you've been asked already, is what you're trying to
achieve in the end (not what form you imagine the solution to take).

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #3

P: n/a
ta***@dpir.com (Siamak) wrote in
news:cf**************************@posting.google.c om:
Hi,

Is there a way to add a scrollbar within a html file, just like
buttons and other form items.

I want it to invoke an applet function every time a scrolling event
occurs.

Thank you,
Siamak


Unfortunately this only works in IE (at least in V6.1)

<html><head>
<script type="text/javascript" language="JavaScript">
function itscrolled(){
pos.innerText = scrollform.scroller.scrollLeft;
}
</script>
<title>Date and time</title>
</head>
<body>
<p id="pos">No value yet</p>
<form method="get" action="none" id="scrollform">
<textarea rows="1" cols="20" id="scroller" name="scroller"
onScroll="itscrolled();" wrap="off">
________<snip> (lots of underscores) <snip>_______________
</textarea>
</form>
</body></html>
Opera and Firebird both don't support the OnScroll event, nither do they
support the scrollLeft attribute (Opera returns the x position of the
textarea). Havn't tried others yet.

--
News Updater, No cgi-bin or database needed
http://www.xmlssoftware.com/NUpdater
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.