CGI checkbox labelling confuses javascript

Discussion in 'Perl' started by Greg G, Jul 11, 2006.

  1. Greg G

    Greg G Guest

    I'm using a bit of javascript code to get the object type of cells in a
    table. However, because of the way CGI's checkbox function puts a
    <label>...</label> block around the checkbox. This confuses javascript
    which says that the type of object in that cell is unknown.

    This seems to be a new feature in the checkbox function. I had this
    same code running under FC2 (sorry, I don't know what the perl version
    or version of CGI I had running), but it does this label block under
    5.8.6/CGI 3.10

    Is there any way to suppress this label block?

    Thanks.

    -Greg G
     
    Greg G, Jul 11, 2006
    #1
    1. Advertising

  2. Greg G

    Mumia W. Guest

    Greg G wrote:
    > I'm using a bit of javascript code to get the object type of cells in a
    > table. However, because of the way CGI's checkbox function puts a
    > <label>...</label> block around the checkbox. This confuses javascript
    > which says that the type of object in that cell is unknown.
    > [...]


    Hi Greg.

    What's stopping you from writing the HTML code for the
    checkbox directly?
     
    Mumia W., Jul 12, 2006
    #2
    1. Advertising

  3. Greg G

    Greg G Guest

    Mumia W. wrote:
    > Greg G wrote:
    >> I'm using a bit of javascript code to get the object type of cells in a
    >> table. However, because of the way CGI's checkbox function puts a
    >> <label>...</label> block around the checkbox. This confuses javascript
    >> which says that the type of object in that cell is unknown.
    >> [...]

    >
    > Hi Greg.
    >
    > What's stopping you from writing the HTML code for the
    > checkbox directly?
    >


    Frankly, the code is much more readable if I use the convenience
    functions. I'm trying to eliminate directly coding the HTML.

    I guess I'm really irked that this was added in with no option to not
    use it.

    -Greg G
     
    Greg G, Jul 12, 2006
    #3
    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. =?Utf-8?B?cmtibmFpcg==?=

    Pie Chart - Labelling

    =?Utf-8?B?cmtibmFpcg==?=, Jan 21, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    536
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Jan 21, 2005
  2. Charlie Zender

    Reading stdin once confuses second stdin read

    Charlie Zender, Jun 19, 2004, in forum: C Programming
    Replies:
    6
    Views:
    824
    Dan Pop
    Jun 21, 2004
  3. Magnus Lyck?
    Replies:
    5
    Views:
    411
    Magnus Lyck?
    Dec 2, 2003
  4. Osiris
    Replies:
    0
    Views:
    304
    Osiris
    Jan 1, 2007
  5. Ciaran
    Replies:
    6
    Views:
    116
Loading...

Share This Page