Commas in OPTION tags

J

JDS

I am confused. I have a list of <OPTIONS>'s and each item in the list has
a comma. (It is a list on names: "lastn, firstn"). This is a list of
OPTION's that is in a SELECT MULTIPLE select box.

However, the second part of each item does not appear in the list -- it is
blank!

Example:

HTML code:

<select multiple size="15" name="user_pool[]" id="user_pool" class="select_pool">
<option value='160'>Tester,Tester Q.</option>
<option value='183'>Tester 1 Lastn,Tester 1 Firstn</option>
<option value='184'>Tester 2 Lastn,Tester 2 Firstn</option>
</select>


Browser Output (ASCII drawing):

-------------------
| Tester |
| Tester 1 Lastn |
| Tester 2 Lastn |
| |
| |
-------------------


The stuff after the comma does NOT SHOW UP!! This occurs for me in
Firefox 1.5, MSIE 6, Opera 8.51, and Konqueror 3.4. (It should be noted
that this problem did not occur in two text-mode browsers, elinks and
lynx. Also, I use Linux as my test platform -- don't know if that matters.)

I don't know what is going on! When I change the commas to anything else,
slash (/), hyphen (-), or whatever, the second half of the text items
shows up.

Any insight into this issue would be greatly appreciated!

Thanks! Lotsa exclamation points!!!
 
E

Els

JDS said:
I am confused. I have a list of <OPTIONS>'s and each item in the list has
a comma. (It is a list on names: "lastn, firstn"). This is a list of
OPTION's that is in a SELECT MULTIPLE select box.

However, the second part of each item does not appear in the list -- it is
blank!

Example:

HTML code:

<select multiple size="15" name="user_pool[]" id="user_pool" class="select_pool">
<option value='160'>Tester,Tester Q.</option>
<option value='183'>Tester 1 Lastn,Tester 1 Firstn</option>
<option value='184'>Tester 2 Lastn,Tester 2 Firstn</option>
</select>

Browser Output (ASCII drawing):

-------------------
| Tester |
| Tester 1 Lastn |
| Tester 2 Lastn |
| |
| |
-------------------

It's not the HTML. I just tried it locally, and the commas and text
after the commas appear as expected.
I'm guessing you are using some kind of CMS or scripting to write this
code to the website? Try escaping the commas maybe?
 
J

JDS

It's not the HTML. I just tried it locally, and the commas and text after
the commas appear as expected.
I'm guessing you are using some kind of CMS or scripting to write this
code to the website? Try escaping the commas maybe?

Thank you for the insight. It is a Javascript problem. I know what is
causing the problem... now I just have to fix it.

later...
 
J

JDS

Thank you for the insight. It is a Javascript problem. I know what is
causing the problem... now I just have to fix it.

later...

Allrighty! Fixed it!

Summary: I was using a JS function to sort items in the SELECT area. This
function was splitting things on a comma (details unimportant) for which
the comma in my actual data was mucking things up.

later...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top