|
Home > Archive > WebSphere Portal Server > April 2005 > Initial size of portlet
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Initial size of portlet
|
|
|
| Hi!
I have made a portlet which only contains one ActiveX object (OCX). My problem is that i don´t know to set the initial size of the portlet (not minimized and not maxinmized), when i set <object height=100% width=100%></object> it´s initial s
ize is the same as minimized and if i set <object height=200px width=100%></object> it´s initial size is ok, but the maximized portlet also have height 200 pixel.
Anyone who can help how to make the sizes of the portlet or is this made somwhere in the websphere portal?
| |
| Michael Harris 2005-04-06, 5:58 pm |
| This is a browser limitation. Portal cannot help you overcome
limitations in the way the browsers interpret the HTML. You would have
the exact same problem in a static HTML page. Most browsers will set
the height of an <object> <embed> or <iframe> tag to 1 px if you specify
a height of 100%. (Ok, it is true that IE will sometimes honor height
of 100% in certain places --such as tables-- if you use Quirks mode...
but it doesn't work in W3C standards mode or in any of the other
browsers so you can't count on it.)
There is no easy way to ensure that your Active X object is as tall as
the browser window. The fact that your Active X object is nested very
deep inside a lot of markup (themes, skins, etc.) makes it even harder.
You might be able to write some JavaScript to dynamically resize the
element once the page has loaded. The problem is trying to figure out
what size to set it to because your portlet won't know how many other
portlets or columns there will be on the page. If you make it too big,
then the user will have to scroll to see the other things on this page.
Another option is to add a WindowListener to your portlet and provide
two different heights for the portlet. For example, when the view is in
normal mode, set the height to 200 px. If maximized, set the height to
400 px. You could even make these heights available in the edit mode of
the portlet.
|
|
|
|
|