XHTML Strict version of textarea spellcheck

  • undoIT
  • Novice
  • Novice
  • User avatar
  • Posts: 22

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • casablanca
  • Proficient
  • Proficient
  • User avatar
  • Posts: 481

Post 3+ Months Ago

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);
  • caroli
  • Newbie
  • Newbie
  • caroli
  • Posts: 5

Post 3+ Months Ago

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 86 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.