Asked By
nadeemrao
0 points
N/A
Posted on - 08/09/2011
I am facing a situation that I have a popup and there are three grids in that popup. I want to hide the data grid when its data source is null. The problem is not to hide the grid; problem is that I want to resize that popup according to the content. E.g. if two data grids are shown, the height of that popup should be reduced automatically.
Popup resizing on content based?
I believe it's good to maintain the same width, after that alter the window's peak only from the software.
Resizing eye-port can be achieved should you include the entire web page on a level. You will get the peak and also width of the coating, then by means of script You simply resize of the question towards the layer's dimension +additional pixels to possess a boundary
.
Answered By
andre
0 points
N/A
#92819
Popup resizing on content based?
I'd be careful resizing browser windows because it can very quickly get annoying (particularly if the user opens the page directly and not as a pop-up). What if a user wants a bit of space around the content to make it easier to read? In most browsers you can also turn off certain Javascript effects like moving and resizing windows – they may even be off by default.
The idea of wrapping the content in a div should work fine at least for the height. If the width still shows the entire width of the current window then try adding float:left and it will fit to the width of the content.
A nice solution would be to use a lightbox script to display the content. I don't know of any off-hand that would resize to HTML/iframed content, but it's worth looking into.
Â
Â