By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

scroll box focus

P: n/a
I have a scroll box that allows multiple selections. Something like:

<select size=4 multiple name=xyz>

Now, when i show the form i default select one of the entries. If
the selected entry is further down the list it won't be seen by
the user. Is there a way i can make the selected entry appear
in the visible portion of the select box??
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ivo
"steve farris" <fm*******@yahoo.com> wrote in message
news:dd**************************@posting.google.c om...
I have a scroll box that allows multiple selections. Something like:

<select size=4 multiple name=xyz>

Now, when i show the form i default select one of the entries. If
the selected entry is further down the list it won't be seen by
the user. Is there a way i can make the selected entry appear
in the visible portion of the select box??


Do you pre-select, serverside or clientside? If done serverside, Mozilla
displays the selected fine, just as IE(5) even clientside. I did not get
Mozilla(1.0) to scroll down however, when I had a javascript select a bottom
option. Perhaps add some text in a div next to the select detailing how many
are currently selected (which is never visible so might be appreciated
anyway)

var howmanyselected=0;
var xyz=yourreferenceto.xyz.options;
for( i=xyz.length ; i-- ; )
if( xyz[i].selected )
howmanyselected++;

var s=(howmanyselected==1) ? '' : 's' ;
referenceto.thediv.firstChild.nodeValue=
'Currently '+howmanyselected+' item'+s+' selected.' ;
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.