how to disable an onclick event?
        Posted  
        
            by 
                user1819709
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user1819709
        
        
        
        Published on 2012-11-25T13:02:21Z
        Indexed on 
            2012/11/25
            23:04 UTC
        
        
        Read the original article
        Hit count: 222
        
    <form id="QandA" action="<?php echo htmlentities($action); ?>" method="post">
    <table id="question">
    <tr>
    <td colspan="2">
    <a onclick="return plusbutton();">
    <img src="Images/plussign.jpg" width="30" height="30" alt="Look Up Previous Question" class="plusimage" id="mainPlusbutton" name="plusbuttonrow"/>
    </a>
    <span id="plussignmsg">(Click Plus Sign to look up Previous Questions)</span>
    </td>
    </tr>
    </table>
    </form>
In the code above I am able to replace an image with another image when the if statement is met. But my problem is that when the image is replaced, it does not disable the on click event. My question is that when the image is replaced, how do I disable the onclick event onclick="return plusbutton();?
© Stack Overflow or respective owner