/    Sign up×
Community /Pin to ProfileBookmark

listbox+disable the input data but to scroll through the data

I have a listbox having 10 options.Now I want to disable the input data so they can’t edit anything but I still want them to scroll though the data so they can see the full set of data without going to edit mode which enables all the controls and which intern allows scrolling.

Any idea how to do this..through javascript?

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>

<body>
<select name=”select” size=”6″>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select>
</body>
</html>

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@David_HarrisonMar 01.2005 — Just put <select name="select" size="10" disabled="disabled">

Then they can see but not touch.
Copy linkTweet thisAlerts:
@gmmsk7authorMar 01.2005 — i have applied already 'disabled'. problem is I want to scroll though the data so they can see the full set of data.
Copy linkTweet thisAlerts:
@David_HarrisonMar 01.2005 — I'm afraid you can't disable the field AND still allow the user to scroll through, it's either disabled or it's not. There are a couple of possible JavaScript solutions that spring to mind but can you give a little bit more information about the situation so that I can determine which one would be best.
Copy linkTweet thisAlerts:
@gmmsk7authorMar 01.2005 — Thanks. I want to disable or you can say that option values are not editable i.e non clickable- the input datas(i.e options), so the users can't edit anything but I want them to scroll though the data so they can see the full set of data.
Copy linkTweet thisAlerts:
@David_HarrisonMar 01.2005 — OK, never mind, try this:&lt;select name="select" size="10" onfocus="temp=this.selectedIndex;" onchange="this.selectedIndex=temp;"&gt;
Copy linkTweet thisAlerts:
@gmmsk7authorMar 01.2005 — Thanks.

It's Working....thanks for your help..
Copy linkTweet thisAlerts:
@David_HarrisonMar 01.2005 — Happy to help. ?
×

Success!

Help @gmmsk7 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...