PDA

View Full Version : XHTML and OnClick



cameron
10-04-2005, 02:04 PM
I'm building a new site and trying to make it XHTML 1.0 Transitional complient.
The part I'm working on right now is a form for maintaining content, and I want to have a confirmation message when the user choose to delete something. XHTML doesn't like my onClick. How can I do this instead?



onClick="javascript:return confirm('Are you sure you want to delete the post?')"

agua
10-04-2005, 04:20 PM
I've had this problem before and if I remember correctly - try 'onclick' (notice the 'C' becomes a 'c')

Masetek
10-04-2005, 05:57 PM
Yep, that's right. XHTML doesn't allow capitals in your tags :cool:

cameron
10-05-2005, 09:02 PM
Thanks. My XHTML knowledge doesn't extend much past the code validator, so I forgot about not having capital letters.