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

  • SEARCH
  • Home
  • 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 8219603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:13:41+00:00 2026-06-07T13:13:41+00:00

My function is working perfectly. But i cant seems to hide the button or

  • 0

My function is working perfectly. But i cant seems to hide the button or show new buttons upon using onclick function.

Sample:

  var download = document.getElementById('download');
  function RemoveDoc(Doc)
  {
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","functions/remove.php?Doc="+Doc,true);
xmlhttp.onreadystatechange=function()
{
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {

        download.syle.visibility='hidden';
        download.style.display ='none'
        document.getElementById("RemoveMsg").innerHTML= xmlhttp.responseText;
    }
}
xmlhttp.send();

    return false;

}

My form

   //I tried to add in the download button to be hidden here but still invalid
   <input type="submit" id="remove" name="Name" value="Remove" onclick="return RemoveDoc(this.value); document.getElementById('download').style.visibility='hidden'; return false;" />
   <input type="submit" id="download" value="download"/> //want to hide this button.
   <input type="file" id="reupload"/> //want to show this.

I tried display = ‘none’ also invalid for my download to be disappear after function called out successfully. Kindly advise

  • 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-07T13:13:42+00:00Added an answer on June 7, 2026 at 1:13 pm

    Remove return from your call, make it

    onclick="RemoveDoc(this.value); document.getElementById('download').style.visibility='hidden'; return false;"
    

    Using return was making the statements after your function call unreachable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following JQuery function is not working entirely. IE 7 processes both alerts, but
Window.open javascript function is not working in Mozilla, but working in other browsers, here
Struggling with this tournament fixtures algorithm. The code is working perfectly but I need
Working on the same page as before,but now I'm using it as a playground
I'm new to jQuery but I managed to get something working. The only thing
I have this action script code that is working perfectly but i am try
I am using ajax animation extender in my application. It is working perfectly in
So I had this working perfectly fine, but now for some reason I can't
Using MooTools Request.HTML, I have my Request call working perfectly, updating my page element
This script is working perfectly with Chrome and Safari, but Firefox is bugging up

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.