How to replace a image button with a plain image
<pre><code>function insertQuestion(form) {   

var x = "&lt;img src='Images/plussigndisabled.jpg' width='30' height='30' alt='Look Up Previous Question' class='plusimage' name='plusbuttonrow'/&gt;&lt;span id='plussignmsg'&gt;(Click Plus Sign to look &lt;br/&gt; up Previous Questions)&lt;/span&gt;" ;

    if (qnum == &lt;?php echo (int)$_SESSION['textQuestion']; ?&gt;) {

   $('#mainPlusbutton').html(x); // no need to create a jQuery object

}

//append rows into a table code, not needed for this question

}

&lt;form id="QandA" action="&lt;?php echo htmlentities($action); ?&gt;" method="post"&gt;

&lt;table id="question"&gt;

&lt;tr&gt;
&lt;td colspan="2"&gt;
&lt;a onclick="return plusbutton();"&gt;
&lt;img src="Images/plussign.jpg" width="30" height="30" alt="Look Up Previous Question" class="plusimage" id="mainPlusbutton" name="plusbuttonrow"/&gt;
&lt;/a&gt;
&lt;span id="plussignmsg"&gt;(Click Plus Sign to look up Previous Questions)&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;table id="questionBtn" align="center"&gt;
&lt;tr&gt;
&lt;th&gt;
&lt;input id="addQuestionBtn" name="addQuestion" type="button" value="Add Question" onClick="insertQuestion(this.form)" /&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;/form&gt;
</code></pre>

<p>What is suppose to happen with code above is that the user clicks on the "Add Question" button and this will append question numbers into a table. Now what is suppose to happen is that if the if statement is met in the jquery function, then it suppose to replace the plus button image <code>Images/plussign.jpg</code> with <code>Images/plussigndisabled.jpg</code>. But it is not doing this.</p>

<p>So my question is that what is the best way to replace an image button with another image button? Also in the document ready function I need it to go back to displaying the <code>Images/plussign.jpg</code> button.</p>
