SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    readonly listbox

    Hi all
    I want to have a listbox that has readonly feature.When the listbox is long it should be scrollbale but when we click inside the listbox the clicked value should not be selected.

    I made like this

    for(var cnt=0;cnt<document.forms[0].selectedAccessLevel.length;++cnt){
    document.forms[0].selectedAccessLevel.options[cnt].selected=false;
    }

    selectedAccessLevel is my listbox name.

    I tried using blur etc... but when i click inside the listbox it gets selected and deselected but a dotted line appears around the selected item

    Can anyonehelp me our in this

    Thanks in advance

    Venkatesh Loganathan

  2. #2
    Non-Member XX7509's Avatar
    Join Date
    Feb 2003
    Location
    Antarctica
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think you post this in the wrong board. this the support forum for site point accounts.....

    cant you just set enabled to false? is this PHP code or what? If its .Net code then you can just use the readonly property to true...

    can you give more information please.

  3. #3
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    readonly listbox

    im using a listbox and there is only disabled feature.If i set this to false then i cant scroll . i want to scroll but should not be able to select anything in the listbox.Even if it is selected it should get deSelected

  4. #4
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im using javascript

  5. #5
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i added a script to deselect the select item onchange..its working fine but a selected border(dotted line) appears around the selected item

  6. #6
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moved to the correct forum.


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
  •