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.
  1. <form>  
  2.     <table id="target">  
  3.         <tr><td> <input type="text" name="foo"></dr></tr>  
  4.     </table>  
  5. </form>  

Code Block B.
  1. <table id="target">  
  2.     <form>  
  3.         <tr><td><input type="text" name="foo"></dr></tr>  
  4.     </form>  
  5. </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.
  1. <table id="target">  
  2.     <form>  
  3.         <tr><td> <input type="text" name="foo"></dr></tr>  
  4.     </form>  
  5.     <tr><td> <input type="text" name="bar"></dr></tr>  
  6. </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