alanwilliamson
I just hit up against a little gotcha with the Safari browser for Apple. People had been complaining they couldn't comment on our blogs from Safari and I was pulling my hair out trying to figure out why. After a VNC session with a Safari browser, finally got to the bottom of it. (thank you Andy for lending me your Mini!)
If you are setting custom attributes on a DOM object, then Safari doesn't like them starting with an (_) underscore.
So instead:
div.setAttribute( "_contentloaded", "1" );
change to:
div.setAttribute( "contentloaded", "1" );
Interestingly though, it is more than happy to read attributes beginning with an underscore if already present in the DOM, just coughs with a very descriptive "Dom Exception 5" error. Because it was reading the attributes fine enough, it took a little debugging to find this one.
Comments
please note, all comments will be moderated for spam and abuse before being publicly posted.
Article Details
- Published:
8:03 PM GMT, Tuesday, 27 March 2007 - Categories:
Technical CFML - Tags:
safari dom javascript setattribute - Comments:
1 left; add comment
Related Articles
Article Archives


Awesome - thanks Alan!