SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: readonly listbox
-
Mar 9, 2005, 00:20 #1
- 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
-
Mar 9, 2005, 01:59 #2
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.
-
Mar 9, 2005, 03:13 #3
- 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
-
Mar 9, 2005, 03:59 #4
- Join Date
- Mar 2005
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
im using javascript
-
Mar 9, 2005, 04:13 #5
- 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
-
Mar 9, 2005, 06:32 #6
- 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