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

forcing highlight of select

P: n/a
I have a select box set to multiple. When the user hits the submit button, I
want to make sure that all entries in that select box are highlighted. How
can I do that? Can I put some code in the onSubmit event? If so, can someone
help me with the syntax?
Oct 14 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Lee
middletree said:

I have a select box set to multiple. When the user hits the submit button, I
want to make sure that all entries in that select box are highlighted. How
can I do that? Can I put some code in the onSubmit event? If so, can someone
help me with the syntax?


I must not understand what you're asking for.
If all of the options are always supposed to be selected, why not
just create them as selected in the HTML? Why use a selection box
at all, for that matter? If the options are constant, why can't
the server-side code simply know what the options are, so you don't
have to send them?

Oct 14 '05 #2

P: n/a
I did a poor explanation, sorry. I used a selection box which is prefilled
with data from the DB, and let the user decide to add or delete items to the
select box from another one just to the left of it. But this:
why not just create them as selected in the HTML?

turned out to be the correct answer. Works like a charm. Thanks!
Oct 14 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.