An issue of dynamically filling the select box with Ajax in IE7

Source: Internet
Author: User

Symptoms:

If you use ajax to dynamically fill the content, when filling the SELECT statement, there are two select statements on the page side by side. If the length of the filled content exceeds the default length, in IE7, the position of the next select box is not automatically extended. Row 1:

 

Solution:

I use jquery to fill in the data here. before filling in the data, set the visibility of the SELECT statement to hidden, and set it to visible after filling. The effect is shown in the second row.

Code:

Code
// Fix IE7 auto expand select:
// First hide the selects
$ ( ' # Second_cat_fix ' ).Css ( ' Visibility ' , ' Hidden ' );
Fillthings ( '' , ' # First_cat_fix ' );
// Then show the selects.
$ ( ' # Second_cat_fix ' ).Css ( ' Visibility ' , ' Visible ' );

I have already put the project file here. You can drag it down and have a look. Google Ajax libraries API is used to load jquery.

For more information, see this log: ieblog for the select few...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.