It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Resize popup size depending upon longest text in drop down l

Resize popup size depending upon longest text in drop down l

Postby technoraj on Wed Feb 21, 2007 3:34 am

Hi Experts,

The scenario is as belwo:

I am opening a popup window which has drop down list box populated dynamically with various options. When I open the popup, the width of popup is fixed. However, the text in list box exceeds which causes it to flow off the popup window. Is there a way to dynamically reset the popup size based upon text size in drop down?

Here is what I am doing:

step1: open popup window

popWin = window.open(urlstring,'','height=120,width=450,resizable=1,toolbar=no,minimize=no,status=no,memubar=no,location=no,scrollbars=no,top=200,left=200');
}

step2: create drop down combo box and populate dynamically
<TABLE border="0" width="100%">
<TR>
<TD></TD>
<TD nowrap>Select an Option:</TD>
<TD></TD>
<TD>
<select name="summaryEventId">
<option value="1">Current Address</option>
<option value="2" selected>Past Address - 01/01/2007</option>
<option value="3">Some large text goes here- 02/19/2007</option>
</select>
</TD>
<TD></TD>
</TR>
</TABLE>

Thanks.
technoraj
 
Posts: 0
Joined: Wed Feb 21, 2007 12:10 am

Who is online

Users browsing this forum: psbot [Picsearch] and 5 guests