Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.

2010/12/06

Stupid HTML Error

Code Block A.

<form>
<table id="target">
<tr><td> <input type="text" name="foo"></dr></tr>
</table>
</form>

Code Block B.

<table id="target">
<form>
<tr><td><input type="text" name="foo"></dr></tr>
</form>
</table>
Not much difference, is there? In fact, I'd say they're functionally identical, unless you set form as a block in your CSS. But there is a difference if you're going to use Javascript to add to the form. If you append to the table, you'll get something like this.

<table id="target">
<form>
<tr><td> <input type="text" name="foo"></dr></tr>
</form>
<tr><td> <input type="text" name="bar"></dr></tr>
</table>

And this will not be part of the form when you press submit. Which I have conveniently left out of the code blocks. Hrmm. Still, watch for that. It's the problem that hounded me over the weekend.

No comments:

Post a Comment