Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Enable scrollbar at table cell, HTML, Javascript

Posted on 2007-04-11
4
Medium Priority
?
902 Views
Last Modified: 2008-02-01
Hi there,
I am creating an html page. I have a table, and in one of them i have enabled the scrollbar using
<div style="width:600px;height:400px;overflow:auto;">
However i would like to show the scrollbar and enable it only when the mouse is over that cell.
Anyone know how to do that in javascript?
0
Comment
Question by:ioustinos_sarris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
sankarbha earned 150 total points
ID: 18889919
try this:

<script language='javascript'>

function mouseover_divOne()
{
      document.getElementById('divOne').style.overflow='scroll';
}
function mouseout_divOne()
{
      document.getElementById('divOne').style.overflow='auto';
}

</script>

<div
id='divOne'
style="width:600px;height:400px;overflow:auto;"
onmouseover='mouseover_divOne();'
onmouseout='mouseout_divOne();'
>cell</div>
0
 
LVL 8

Expert Comment

by:jawahar_prasad
ID: 18891521
sankarbha's code is a good one...
0
 

Author Comment

by:ioustinos_sarris
ID: 18899896
seems very good...however
a. why when the scrolling of the list ends the normal page start scrolling?thats not really nice
b. how can i hide the horizontal scroll bar?
0
 
LVL 8

Expert Comment

by:sankarbha
ID: 18903684
I dont get point (a)
Point (b) To hide horizontal scroll bar
<script language='javascript'>

function mouseover_divOne()
{
      document.getElementById('divOne').style.overflowY='scroll';
}
function mouseout_divOne()
{
      document.getElementById('divOne').style.overflowY='auto';
}

</script>

<div
id='divOne'
style="width:600px;height:400px;overflow-y:auto;"
onmouseover='mouseover_divOne();'
onmouseout='mouseout_divOne();'
>cell</div>

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question