IE5 + Choice boxes


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: IE5 + Choice boxes

  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.

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center