CGI checkbox labelling confuses javascript

G

Greg G

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
 
M

Mumia W.

Greg said:
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?
 
G

Greg G

Mumia said:
Greg said:
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
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top