[Select Tag] setting option text

sergio ruiz <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <CABOFMNkC2XuiAe8FiVUsWd-amZs0oA09Js4JM4==3nDd=NthZw@mail.gmail.com>
I am creating a select for options like:

- 25 miles
- 50 miles
- 75 miles
- 100 miles

The miles part, i don’t want, i just want the value..

i am currently setting list: for an array of the above values..

i get:

<select id="selectDistance" class="form-control" name="2”>
<option value="1">25 Miles</option>
<option value="2">50 Miles</option>
<option value="3">75 Miles</option>
<option value="4">100 Miles</option>
</select>

i am wondering if i could do something that would allow me to set the value
and the text..

so the value would be 25 or 50, etc..
and the text in the option would be 25 miles, 50 miles, etc..

so i would  get:

<select id="selectDistance" class="form-control" name="2”>
<option value=“25">25 Miles</option>
<option value=“50">50 Miles</option>
<option value=“75">75 Miles</option>
<option value=“75">100 Miles</option>
</select>

so setting the selected: 50 would mark the appropriate option as selected.

Thanks!

Thanks!

----
peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.