Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
Hide Submit button when particular div element is loaded in the page

I have the following html code and this is a part of the html

<div id="mount"
 <span> please wait while we are loading...</span>
</div>

and I have a main submit button

<div id="MainContentbutton" class="buttonscontainer" data-kaction="submitdiv" style="display:block";>

 <input type="submit" name="MainContentbtnsubmit" value="submit" id="MainContentbtnsubmit"
 class="submitbutton" onbeforesubmit="Application_onbeforeSubmit" data-kaction="submit" style="font-weight:bold;>
<div>

I wanted to hide the button by using

display:none 

and this should hide only when the following div is loaded.

 div id="mount"

I am trying to find the solution and learn in the process.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In your Js file or wherever you load the data when the result comes in you can do it like this:

// this function is to fake the loading 
function delay(time) {
  return new Promise(resolve => setTimeout(resolve, time));
}

delay(1000).then(() {

  var mount = document.getElementById('mount');
  var submitButton = document.getElementById('MainContentbtnsubmit');

  mount.css({'display' : 'none'});
  submitButton.css({'display' : 'block'});

});

Don't forget to set the display of the button to none, in line css.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!