• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic Table rows/cells etc..

 
ryan headley
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may be tough to explain but here is the effect I need:
I have a table divided into 12 equals size cells.
Above the table are some navigational buttons, etc.
When I mouse over one of the buttons, I need to get a picture to pop up above (on the z-plane), thus "covering" the 2 cells in the table.
These two cells will be right next to each other forming a square but that square could fall in any two of the side by side cells. As I mouse over other buttons, the image should not only change but change which two cells it is covering.
Graphically: (every 2 vertical lines equal one cell)
| | | | | | |
| | | | | | |
| | | |x|x| |
| | | |x|x| |
the x's represent an image covering the two cells of the table. that location may change depending on what button I hover over.
I can't cut the image in 2 pieces because there cannot be a line down the middle of it.
Finally,
I've gone down the road of creating a seperate row and replacing its visibility with collapse/visible depending...however when I hide a row with collapse and replace it with the row that contains the image, the entire row appears below where it should.
Any ideas? I know its a toughy....
[ May 07, 2003: Message edited by: ryan headley ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well it is prety tricky and I could do it, but I would need to see some code first..perferably how the table is done, etc. or any attempts you tried at it...
All it is is an image that is dynamically placed.
document.FormName.ImageName.style.left=X
document.FormName.ImageName.style.top=Y
You would have to get the position of the table using some DOM stuff which I just taught my self for the next version of my form validation script
And you need to know the size of each element on the table.
Eric
 
ryan headley
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it...about an hour or so after I posted.
I can post the code later if someone wants to see it....
 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ryan,
it would be apreciated if u could post it here. I am also working about sth. similar.
thx..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic