clear value of text input if checkbox is checked restore value if unchecked using javascript
<p>I have a text field with an image value populated from database.  I need to have a checkbox that would clear value when checked and restore value when unchecked.</p>

<pre><code>&lt;input type="text" value="/images/sampleimage.jpg" /&gt;
Remove this image &lt;input type="checkbox" name="remove"&gt;
</code></pre>
