Connecting Tech Pros Worldwide Help | Site Map

CGI checkbox labelling confuses javascript

  #1  
Old July 11th, 2006, 07:55 PM
Greg G
Guest
 
Posts: n/a

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>...</labelblock 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
  #2  
Old July 12th, 2006, 12:55 AM
Mumia W.
Guest
 
Posts: n/a

re: CGI checkbox labelling confuses javascript


Greg G wrote:
Quote:
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>...</labelblock 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?

  #3  
Old July 12th, 2006, 03:35 PM
Greg G
Guest
 
Posts: n/a

re: CGI checkbox labelling confuses javascript


Mumia W. wrote:
Quote:
Greg G wrote:
Quote:
>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>...</labelblock 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

Closed Thread