Help - Search - Members - Calendar
Full Version: checkbox 'checked' attribute
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
royhb
This line, within a table that is within a form:

<tr><td>Boats</td><td><input type=\"checkbox\" id=\"boatsbox\" onclick=\"boxclick(this,'boats')\" checked /></td></tr>\

Works on Firefox, Safari, Chrome.

I'm trying to preset some of the checkboxes to 'checked' and some not.

Works well on the above but all checkboxes are unchecked in IE8, Opera.

Any thoughts? I've Googled with no useful results.

Thanks in advance
Christian J
I get no checkbox at all, due to the backslashes (is it part of a server-side script?). When I remove the backslashes a checked checkbox shows up in IE8 and Opera9.
pandy
Is it part of a client-side script?
royhb
QUOTE(pandy @ Sep 9 2009, 01:25 AM) *

Is it part of a client-side script?

Yes, it's built by js using some data loaded from xml files.

I found the problem. Event though it is in the sample line above, the actual code omitted the closing > of the input type tag.

Evidently some browsers tolerated this while other (correctly) don't.

Once I closed the tag everything worked great on all browsers.
Error on my part, not a failing of the technology.
pandy
And that's one of the reasons we keep asking people to post the URL to a sample page. tongue.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.