Results 1 to 2 of 2

Thread: Netscape Issue with Disabling a List Box

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    39

    Netscape Issue with Disabling a List Box

    I've posted this question under the Javascript forum but its using ASP and VBScript as well.
    ________________________________________________________
    I have code which disables and re-enables a List Box depending on whether a check box has been selected or not. The Code works within IE but not Netscape. When Disabled all the Items are showen as selected and then all cleared when the check box is unselected.

    Within Netscape if the user selects the Check box all the items come up as selected yet the user can still hit the List Items. This clears the box of looking like all the items are selected. The user is NOT able to select any of the items within the box.

    How can a lock down this List Box and prevent it form looking like its been re-enabled? If the user clicks the List Box the top item keeps apearing as if it has been selected.


    'this is what enables and disables the List.
    <input type="checkbox" name="checkboxAll" value="checkbox" onclick="if (checkboxAll.checked) {SelectAll(); document.frmMine.LIST.disabled=true; else{document.frmMine.LIST.disabled=false; ClearALL()}">

    'this shows all items as selected.
    function SelectAll() {
    var colOptions = document.frmMine.LIST.options;
    var intList;
    for (intList=0;intList<colOptions .length; intList++)
    if (!colOptions[intList].selected)
    colOptions[intList].selected=true;
    }


    'this clears all items
    function SelectAll() {
    var colOptions = document.frmMine.LIST.options;
    var intList;
    for (intList=0;intList<colOptions .length; intList++)
    if (colOptions[intList].selected)
    colOptions[intList].selected=false;
    }

    Any help/ideas would be greatly appreciated. At the minute it looks stupid with Netscape . Thanks in advance
    Gin

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    This is a case of just because you can doesn't mean you should.

    Don't have so much code in your HTML tag. Call a function that checks the status of the checkbox.

    Why are you selecting all the options if it is disabled?

    (I don't have Netscape.. sorry)

    (I should rephrase that.. I won't have Netscape)
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width