473,395 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

scrolling my div element

hey all,
i have a datalist inside my div element which is set to clip overflow
content. i have a left and right button that handles scrolling the div left
or right by just hovering over the buttons.

however, i've seen it where if i hover over the div on the left or right
side it will scroll. does anyone have any ideas on how i would implement
something like this?

thanks,
rodchar
Oct 17 '07 #1
4 2471
the same way you do with the buttons. the div has the same event
handlers, you just need to look at the event x position to determine
which way to scroll.

-- bruce (sqlwork.com)

rodchar wrote:
hey all,
i have a datalist inside my div element which is set to clip overflow
content. i have a left and right button that handles scrolling the div left
or right by just hovering over the buttons.

however, i've seen it where if i hover over the div on the left or right
side it will scroll. does anyone have any ideas on how i would implement
something like this?

thanks,
rodchar
Oct 17 '07 #2
You would implement this with client-side javascript. Search on "scrollable
div" and you'll find plenty of good sample code.
--Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"rodchar" wrote:
hey all,
i have a datalist inside my div element which is set to clip overflow
content. i have a left and right button that handles scrolling the div left
or right by just hovering over the buttons.

however, i've seen it where if i hover over the div on the left or right
side it will scroll. does anyone have any ideas on how i would implement
something like this?

thanks,
rodchar
Oct 17 '07 #3
how do i get to the event x position?

"bruce barker" wrote:
the same way you do with the buttons. the div has the same event
handlers, you just need to look at the event x position to determine
which way to scroll.

-- bruce (sqlwork.com)

rodchar wrote:
hey all,
i have a datalist inside my div element which is set to clip overflow
content. i have a left and right button that handles scrolling the div left
or right by just hovering over the buttons.

however, i've seen it where if i hover over the div on the left or right
side it will scroll. does anyone have any ideas on how i would implement
something like this?

thanks,
rodchar
Oct 17 '07 #4
thanks everyone for the direction.
rod.

"rodchar" wrote:
hey all,
i have a datalist inside my div element which is set to clip overflow
content. i have a left and right button that handles scrolling the div left
or right by just hovering over the buttons.

however, i've seen it where if i hover over the div on the left or right
side it will scroll. does anyone have any ideas on how i would implement
something like this?

thanks,
rodchar
Oct 26 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mr_burns | last post by:
Hi, Is it possible to disble horizontal scrolling using CSS? I want to try and use two backgrounds, one tiling vertically and part of the body background, which will not force scrolling, but one...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
6
by: Jon Paal | last post by:
an excellent working solution for scrolling tables appears at this link http://www.litotes.demon.co.uk/example_scripts/tableScroll.html author has no contact page, but I have a question about...
1
by: sven.daems | last post by:
Hy I want to add a sort of news service to my site. I've a number of messages, wich I want to be shown in a <marquee> tag. I've found a simple scrit that generates an random message (wich I've...
4
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can...
2
by: Gaetan | last post by:
I have some log data maintained in a DB that I would like to display on a web page. Some rows of the DB table are wider than the web page therefore horizontal scrolling will be required to view the...
5
by: PythonistL | last post by:
I am a newbie with Javascript. I have this simple script for scrolling text <HTML> <HEAD> <TITLE>Scrolling Message Script</TITLE> <SCRIPT language="JavaScript"><!-- var msg = 'My scrolling...
3
by: dunerunner | last post by:
We have a table within a div whose overflow-x is scroll. It is a long table, so the width of the div is 800px, giving us a scrollbar at the bottom. When users tab from cell to cell, the cells...
1
by: tromton | last post by:
heello, i havee one div element in my site with several anchors, that i link to. to change from anchor to another id like to have a smooth scrolling effect. all the smooth scrolling effects i...
3
by: Spizzat2 | last post by:
I've got some javascript that will show or hide an element on the page when a user activates it. The problem I'm having is that the content changes the length of the page, so if the user scrolls to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.