0

What I'm trying is in the title.

So I have in my jsf page :

    <h:outputScript name="jsf.js" library="javax.faces" />
    <h:outputScript name="jquery.js" /> 
    <h:outputScript target="head">
        $ = jQuery;
        $(document).ready(function() {});
        $("#question").attr("spellcheck",false);
        $('textarea').attr("spellcheck",false);
    </h:outputScript>

and below

    <h:inputTextarea id="question" cols="90" rows="20" value="#{myBean.question}" />

But it's not working.

I also tried

$("#question").val("hello world");

It's also not working.

And last try to be sure the code is executed

        alert('Hello World');

The popup appears but nothing else.

What's the problem ?

tutankhamun
  • 880
  • 2
  • 11
  • 21
tweetysat
  • 2,187
  • 14
  • 38
  • 75
  • does this work ? `$(document).ready(function() { $('textarea').attr("spellcheck",false);});` – Daniel Apr 25 '13 at 07:58

1 Answers1

-1

Try adding quotation marks to false like below:

$("#question").attr("spellcheck","false");
$('textarea').attr("spellcheck","false");