/    Sign up×
Community /Pin to ProfileBookmark

Resize popup size depending upon longest text in drop down list box

Hi Experts,

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.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@LeeUFeb 21.2007 — Don't double post. Thread in HTML fourm has been removed.
×

Success!

Help @technoraj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...