471,066 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Hover popups in table cells

In my ASP.NET web app I'm trying to create a popup DIV that displays some
text when the user hovers the mouse over a link in a particular cell in a
table. I'm using JavaScript to show & hide the popup.

I've played around but can't get the popup to work properly. Toggling
between 'visibility:hidden' & 'visibility:visible' doesn't work correctly
because the row height is incorrect and includes the height of the popup
text. Toggling between 'display:none' & 'display:block' doesn't work because
the row height gets increased when the popup is displayed.

Can someone help me out to get the popup to work properly so that the row
height is correct? It needs to work with IE6.

Aug 13 '08 #1
3 2745
This is what I use, hope it helps.

function switchVisible(objname) {
var obj = document.getElementById(objname);

if ( obj.style.display == 'none' ) {
obj.style.display = '';
} else {
obj.style.display = 'none';
}
}
In my ASP.NET web app I'm trying to create a popup DIV that displays
some text when the user hovers the mouse over a link in a particular
cell in a table. I'm using JavaScript to show & hide the popup.

I've played around but can't get the popup to work properly. Toggling
between 'visibility:hidden' & 'visibility:visible' doesn't work
correctly because the row height is incorrect and includes the height
of the popup text. Toggling between 'display:none' & 'display:block'
doesn't work because the row height gets increased when the popup is
displayed.

Can someone help me out to get the popup to work properly so that the
row height is correct? It needs to work with IE6.

Aug 13 '08 #2
This is what I've been using and it doesn't work. It will show & hide the
popup OK but it also causes the row height to get increased & decreased each
time.

"The Colorado Kid" <tckwrote in message
news:9d*************************@newsgroups.comcas t.net...
This is what I use, hope it helps.

function switchVisible(objname) {
var obj = document.getElementById(objname);
if ( obj.style.display == 'none' ) {
obj.style.display = '';
} else {
obj.style.display = 'none';
}
}
>In my ASP.NET web app I'm trying to create a popup DIV that displays
some text when the user hovers the mouse over a link in a particular
cell in a table. I'm using JavaScript to show & hide the popup.

I've played around but can't get the popup to work properly. Toggling
between 'visibility:hidden' & 'visibility:visible' doesn't work
correctly because the row height is incorrect and includes the height
of the popup text. Toggling between 'display:none' & 'display:block'
doesn't work because the row height gets increased when the popup is
displayed.

Can someone help me out to get the popup to work properly so that the
row height is correct? It needs to work with IE6.


Aug 13 '08 #3
Oh, the problem is the position setting in the style of the div itself. I've
got a custom control that does this as well. Make sure you set the position
setting of the style attribute to absolute, and it won't resize anything
else on the page.

This is what I've been using and it doesn't work. It will show & hide
the popup OK but it also causes the row height to get increased &
decreased each time.

"The Colorado Kid" <tckwrote in message
news:9d*************************@newsgroups.comcas t.net...
>This is what I use, hope it helps.

function switchVisible(objname) {
var obj = document.getElementById(objname);
if ( obj.style.display == 'none' ) {
obj.style.display = '';
} else {
obj.style.display = 'none';
}
}
>>In my ASP.NET web app I'm trying to create a popup DIV that displays
some text when the user hovers the mouse over a link in a particular
cell in a table. I'm using JavaScript to show & hide the popup.

I've played around but can't get the popup to work properly.
Toggling between 'visibility:hidden' & 'visibility:visible' doesn't
work correctly because the row height is incorrect and includes the
height of the popup text. Toggling between 'display:none' &
'display:block' doesn't work because the row height gets increased
when the popup is displayed.

Can someone help me out to get the popup to work properly so that
the row height is correct? It needs to work with IE6.

Aug 13 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jon W | last post: by
1 post views Thread by YotamElal | last post: by
reply views Thread by leo001 | last post: by

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.