Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resize popup window based on longest content in list box dynamically

Status
Not open for further replies.

tecchnoraj

Programmer
Oct 5, 2004
2
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top