Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8888345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:00:29+00:00 2026-06-14T22:00:29+00:00

<form id=QandA action=<?php echo htmlentities($action); ?> method=post> <table id=question> <tr> <td colspan=2> <a onclick=return

  • 0
    <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();?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:00:30+00:00Added an answer on June 14, 2026 at 10:00 pm

    You disable from within the plusbutton function itself. First, pass the element into the function, like so:

    <a onclick="return plusbutton(this);">
    

    Then disable it in the function:

    function plusbutton(element) {
        element.onclick = '';
        /* then do whatever plusbutton did before */
    }
    

    But since you are using jQuery, it’s better to use handlers. So give the link an id but not an onclick, like this:

    <a id="plusbutton" href="#">
    

    And use jQuery.one() to bind a click handler that happens just once:

    $(document).ready(function() {
        $('#plusbutton').one('click', function(ev) {
            plusbutton();
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

form html: <form action='/register/' method = 'post'>{% csrf_token %} ... <label>Avatar: </label><input type='file' name='avatar'
form: <form id=defineForm method=POST action=api/test> <fieldset> <legend>Generale</legend> <input type=text name=id size=60 maxlength=60/> <input type=text
Form (partial): include ../mixins/form-helpers form(action='/users/create', method='post') div.fields fieldset mixin field('text', 'email', 'Email') mixin field('password',
My form is currently like this: <form action=https://www.dwolla.com/payment/pay method=POST class=form-horizontal> <input type=hidden name=_csrf value=[redacted]>
Form + element: <form id=form action=default.aspx method=post runat=server> <input type=submit id=submit value=Submit runat=server/> </form>
Form HTML <form action= method=post class=form-horizontal><div style=display:none><input type=hidden name=csrfmiddlewaretoken value=6b3d58df7bd4f6d10975462aaf3bd42d></div> <input type=hidden name=paper value=5225
form.html : <form action="p.py" method="post"> <input type="text" id="id_text" name="name_text" /> <input type="submit" id="id_submit" name="name_submit"
form that causes the problem: <%= form_for Like.find(post.user.likes), :html => { :method => :delete
My form action is set to a php file like this: <form name=addstudent action=includes/data.php?act=enquiry
The form: <form action=includes/photos.php id=joinPhotoUploadForm enctype=multipart/form-data> <input type=file name=file id=file><br> </form> The div: (assume

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.