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

186
Views
The JavaScript function does not apply to the form and the confirmation button

The JavaScript function does not apply to the form and the Submit button in HTML The 'js' file is inside another folder I also did the link to the 'js' file correctly

function check_pass() {
  if (document.getElementById('password').value == document.getElementById('passwordconfirm').value) {
      document.getElementById('submit').disabled = false;
  } else {
      document.getElementById('submit').disabled = true;
  }
}
<form name="cForm" id="cForm" method="post" action="php/save.php">
  <fieldset>
      <div class="form-field">
          <input name="username" type="text" id="username" class="full-width" placeholder="نام کاربری" value="">
      </div>
      <div class="form-field">
          <input name="email" type="email" id="email" class="full-width" placeholder="ایمیل" value="">
      </div>
      <div class="form-field">
         <input name="password" type="password" id="password" class="full-width" placeholder="پسوورد" value="" onkeyup="check_pass();">
      </div>
      <div class="form-field">
          <input name="passwordconfirm" type="password" id="passwordconfirm" class="full-width" placeholder="تکرار پسوورد" value="" onkeyup="check_pass();">
      </div>
      <button type="submit" id="submit" class="submit button-primary full-width-on-mobile" disabled>ثبت</button>
  </fieldset>
</form>

about 4 years ago · Juan Pablo Isaza
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!