Call a php function on text selection in text area I have a text area in form. When some text from text area is being selected, I have to enable a button. How can I do that?
If you want to do something when text is selected, take a look at the .select() jQuery event.  Then you can enable/disable the button however you like.

Example from the jQuery page:

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;style&gt;
  p { color:blue; }
  div { color:red; }
  &lt;/style&gt;
  &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;p&gt;

    Click and drag the mouse to select text in the inputs.
  &lt;/p&gt;
  &lt;input type="text" value="Some text" /&gt;
  &lt;input type="text" value="to test on" /&gt;

  &lt;div&gt;&lt;/div&gt;
&lt;script&gt;
    $(":input").select( function () { 
      $("div").text("Something was selected").show().fadeOut(1000); 
    });
&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;