Notes on Java, Solaris, PHP, LDAP…

July 17, 2008

Never call your HTML elements ‘content’

Filed under: Java — negev @ 11:25 am

I’ve created a simple HTML form with basic Javascript validation of the fields. The form would send an email via the server, so it had a textarea which I called ‘content’ – both name=”content” and id=”content”.

However, it turns out that Javascript (Firefox, Safari) can’t retrieve such an element by document.getElementById( ‘content’ ).  It looks that ‘content’ is special/reserved. Once I changed it to ‘message’ then all worked fine.


Blog at