[thelist] Automatic Higlighting
.jeff
jeff at members.evolt.org
Thu Jul 19 12:23:25 CDT 2001
adam,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Adam E.
:
: > With JSP I have written a form that
: > sends information from one page's form
: > to another page's one. This works all
: > fine and dandy except that the
: > information must be highlighted or
: > selected by the user before the submit
: > button will work correctly. I cannot
: > seem to get the OnSumbit JavaScript
: > working correctly so I was wondering
: > if anyone of you knows of how to script
: > this correctly.
:
: Theres a bit too much to put on email, do you
: or does ANYONE know of a simple JavaScript that
: just selects every item in a list on a onCLick
: or onSubmit or OnAnything command. The basic
: script is all I'm looking for, I can tailor it
: to my website.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
the script itself is simple. i'm doing something similar here:
http://members.evolt.org/jeff/code/rank_select.cfm
however, it sounds like there might be a better solution to this. from your
explanations it sounds like you have a form the user interacts with.
submitting that form takes them to another form. on this second form is
where you need to select all the items in a select list. why not just
generate the select list with all the options selected?
<select name="blah" size="10" multiple>
<option value="1" selected>1</option>
<option value="2" selected>2</option>
<option value="3" selected>3</option>
<option value="4" selected>4</option>
<option value="5" selected>5</option>
<option value="6" selected>6</option>
<option value="7" selected>7</option>
<option value="8" selected>8</option>
<option value="9" selected>9</option>
<option value="10" selected>10</option>
</select>
this has the distinct advantage of working in all browsers.
good luck,
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list