XHTML Strict version of textarea spellcheck

  • undoIT
  • Novice
  • Novice
  • User avatar
  • Joined: Jul 12, 2007
  • Posts: 22
  • Status: Offline

Post December 18th, 2009, 4:20 pm

I would like to turn off the built-in spellcheck functionality in certain browsers such as Firefox and Opera on a textarea that contains HTML embed code for visitors to copy and paste. This can be done with following attribute:

spellcheck="false"

However, this causes a validation error for XHTML Strict. Also, it doesn't work properly in Opera, because the spell checking returns after a user selects the embed code in the text area. Is there another method for turning off spell check functionality?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 18th, 2009, 4:20 pm

  • casablanca
  • Proficient
  • Proficient
  • User avatar
  • Joined: May 29, 2007
  • Posts: 481
  • Status: Offline

Post December 18th, 2009, 6:13 pm

The only way I can think of getting around the validation error is to set the attribute through JavaScript, like this:
JAVASCRIPT Code: [ Select ]
document.getElementById('your_textarea').setAttribute('spellcheck', false);
No Strings Attached: A JavaScript graphics demo.
  • caroli
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 16, 2010
  • Posts: 5
  • Status: Offline

Post January 16th, 2010, 7:37 am

you can use the set attribute function or method of javascript..

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 112 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.