Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 927675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:53:26+00:00 2026-05-15T19:53:26+00:00

I have a selectbox that is dynamically filled with an Ajax call. The user

  • 0

I have a selectbox that is dynamically filled with an Ajax call. The user enters a zip code in a textbox and then the selectbox is filled with cities in that zip code. My problem is that the selectbox starts out empty but centered correctly. Once it is filled dynamically from the Ajax response, IE simply expands the selectbox to the right and doesn’t recenter it based on the new width. Firefox and Chrome work fine. I’m using IE7 to test. Here’s the code…

    <table width="400" cellspacing="0" cellpadding="2" border="0">
 <tr>
  <td align="center" colspan="2" class="greyheader">Location
  Information</td>
 </tr>
 <tr>
  <td colspan="2" align="center" class="grey"><span class="pagetitle1">&gt;&nbsp;</span>Please
  use only United States, Puerto Rico or Canada zip codes</td>
 </tr>
 <tr bgcolor="#E1E1E1">
  <td width="200" align="center"><b><u>Origin Zip Code</u></b></td>
  <td width="200" align="center"><b><u>Destination Zip Code</u></b></td>
 </tr>
 <tr bgcolor="#E1E1E1">
  <td width="200" align="center">
   <div id="czipS" class="shipperSpecific">
       &nbsp; 
   </div>
   <div class="consigneeSpecific">
   <center>
   <input size="7" type="text" autocomplete="off" maxlength="7"
    name="originZip" id="originZip" onkeypress="return handleEnter(this,event);"/>
   </center>
   </div>
  </td>
  <td  width="200" align="center">
   <div id="czipC" class="consigneeSpecific">
    &nbsp;
   </div>
   <div class="shipperSpecific">
   <center>
   <input size="7" type="text" autocomplete="off" maxlength="7"
    name="destZip" id="destZip" onkeypress="return handleEnter(this,event);" /> 
   </center>
   </div>
  </td>
 </tr>
 <tr bgcolor="#E1E1E1"> 
  <td  width="200" align="center">
   <div class="consigneeSpecific">
   <select id="originCity" name="originCity" />
   </div>
  </td> 
  <td  width="200" align="center">
   <div class="shipperSpecific">
   <select name="destCity" id="destCity" />
   </div>
  </td>
 </tr>
</table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:53:27+00:00Added an answer on May 15, 2026 at 7:53 pm

    I could help better if I had seen the ajax code and insertion.

    Try re-setting the center-aligning class to the select box after the insertion is done. Often, this triggers IE to calculate things again.

    Something like this (jquery):

    $('#destCity').removeClass('alignCenter').addClass('alignCenter');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a field that is dynamically being filled. I know that the first
I have a Selenium test case that enters dates into a date selector made
I have a select box that gets generated dynamically. I want to allow users
I have a Html Table which consists of rows that were generated dynamically (from
The problem is: On postback, the table does not have the rows that were
I have a third-party js function that dynamically adds/removes options to a SELECT element
I have a page with radio buttons and a textarea that populates data dynamically
So currently I have code, in C++, that creates a few QLabels, a QLineEdit,
I have a UITableView that I am adding dynamically via a initWithFrame. - (void)twitterUpdate
I have a partial that renders a select box using the following method: <%=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.