Commas in OPTION tags

Discussion in 'HTML' started by JDS, Mar 15, 2006.

  1. JDS

    JDS Guest

    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!!!

    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
    JDS, Mar 15, 2006
    #1
    1. Advertising

  2. JDS

    Els Guest

    JDS wrote:

    > 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?

    --
    Els http://locusmeus.com/

    Now playing: Dave Edmunds - Queen Of Hearts
    Els, Mar 15, 2006
    #2
    1. Advertising

  3. JDS

    JDS Guest

    On Wed, 15 Mar 2006 16:44:38 +0100, Els wrote:

    > 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...

    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
    JDS, Mar 15, 2006
    #3
  4. JDS

    JDS Guest

    On Wed, 15 Mar 2006 11:13:15 -0500, JDS wrote:

    > 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...

    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
    JDS, Mar 15, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Julien ROUZIERES

    g++ -pg option and -shared option

    Julien ROUZIERES, Dec 21, 2004, in forum: C++
    Replies:
    1
    Views:
    714
    GianGuz
    Dec 21, 2004
  2. Cas
    Replies:
    5
    Views:
    790
    Kevin Jones
    Aug 28, 2006
  3. AviraM
    Replies:
    2
    Views:
    6,359
    Manish Pandit
    Sep 28, 2006
  4. Kevin Blount

    page.aspx?option - how to detect "option"

    Kevin Blount, Nov 28, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    604
    =?Utf-8?B?RWVyYWo=?=
    Nov 28, 2006
  5. John

    Regex for <option> ... </option>

    John, Jan 23, 2009, in forum: Perl Misc
    Replies:
    10
    Views:
    236
    Eric Pozharski
    Jan 29, 2009
Loading...

Share This Page