A
alex.pedwysocki
Having trouble googling this one.
I have a dynamically generated table that I'd prefer not to set sizes
for.
Is there any way to know the size that the browser is using to display
this cell?
The problem: adding an image (using javascript) that is too large
causes the width of one column to expand. If I have text in another
column it could be squeezed, thus taking up more vertical space. Then
the whole page will become longer and, in doing so, will offset the
view provided by the browser.
In extreme cases, using large tables, this can cause the view to be
offset by many screen lengths. Whatever data was being looked at is
long gone down the page somewhere. This is not a good user
experience.
If my javascript knows the width the cell is being displayed to it can
compensate by picking an image of the right size.
If I can't do that, does anyone have another idea? Thanks!
I have a dynamically generated table that I'd prefer not to set sizes
for.
Is there any way to know the size that the browser is using to display
this cell?
The problem: adding an image (using javascript) that is too large
causes the width of one column to expand. If I have text in another
column it could be squeezed, thus taking up more vertical space. Then
the whole page will become longer and, in doing so, will offset the
view provided by the browser.
In extreme cases, using large tables, this can cause the view to be
offset by many screen lengths. Whatever data was being looked at is
long gone down the page somewhere. This is not a good user
experience.
If my javascript knows the width the cell is being displayed to it can
compensate by picking an image of the right size.
If I can't do that, does anyone have another idea? Thanks!