two check boxes and 1 text field jquery
<p>I have two checkboxes and one text field. I want to put some data into field when one check box is checked and put another data when other checkbox is checked and both these checkboxes shouldn't be checked at the same time. But when these checkboxes are not checked the text field should be empty. I have achieved all the functionality except emptying the field when both my checkboxes are unchecked with the following jquery code.</p>

<pre><code>jQuery(document).ready(function() {
jQuery('#a').click(function() {
if(jQuery('#a').is(":checked")) {
    jQuery('#b').removeAttr('checked');
    name = "hello World!"; 
jQuery('#c').val(name);
}


});
jQuery('#b').click(function() {
    if(jQuery('#b').is(":checked")) {
        jQuery('#a').removeAttr('checked');
        name = "Not hello World!"; 
    jQuery('#c').val(name);

    }
});
jQuery('#a,#b').click(function(){
if(jQuery('#a,#b').not(":checked")){
name = "";
jQuery('#c').val(name);
}
});
    });
</code></pre>

<p>Here is my html:</p>

<pre><code> &lt;input type="textarea" id="c" /&gt;
&lt;input type="checkbox" id="a" /&gt;
&lt;input type="checkbox" id="b" /&gt;
</code></pre>

<p>Please tell me how can I empty the text field when both the checkboxes are not checked.</p>

<p>Also how can I get value of one text field and put it into another text field and what if the value of the first text field is some type of html or javascript code.</p>

<p>One thing more I also want that the value of my variable "name" should be php code. Please tell me how can I do it.</p>
