DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Mark Guest

    IE5 + Choice boxes


    In IE5 when a java applet is loaded from a cached page choice boxes seem to
    resize to only 1 character in size ! This only seems to affect certain builds
    of the java virtual machine (including the current one)

    Any ideas how to prevent this ?

  2. #2
    Michael Melio Guest

    Re: IE5 + Choice boxes


    "Mark" <mre1@bigfoot.com> wrote:
    >
    >In IE5 when a java applet is loaded from a cached page choice boxes seem

    to
    >resize to only 1 character in size ! This only seems to affect certain builds
    >of the java virtual machine (including the current one)
    >
    >Any ideas how to prevent this ?


    I had a similar issue. I used the following to overcome it:

    Select Media <select name="cboProduct" onchange="javascript:PopulateCartSizeList();"
    size="1" style="HEIGHT: 20px; WIDTH: 175px">
    <!--Option content "______________________" here for Netscape formatting.-->

    <option>______________________</option>
    <option>______________________</option>
    the underscore character sets the length. You can then load the box with
    any data you choose:

    function PopulateCartSizeList()
    {
    var intCartSize = arrCartSize.length;
    var intCtr = 0;
    var sProduct = document.PartsFilter.cboProduct.options[document.PartsFilter.cboProduct.selectedIndex].text;
    //clear options:
    document.PartsFilter.cboCartridgeSize.options.length = 0; for (var i = 0;
    i < intCartSize; i++)
    {
    if (arrCartSize[i][0] == sProduct)
    {
    var optionName = new Option(arrCartSize[i][1], arrCartSize[i][1], false,
    false);
    document.PartsFilter.cboCartridgeSize.options[intCtr] = optionName;
    intCtr += 1;
    }
    }
    document.PartsFilter.cboCartridgeSize.options[0].selected=true
    }

    Hope you find this useful.
    Michael.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links