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

124
Views
JS won't send the user to a subpage

I want to send the user to a subpage on my website using js since it needs if/else statements. The js can send the user to youtube, twitter and other websites but it can't send the user to my subpage.. Please help

Here is the JS:

function myFormSubmit() {
  myInput = document.getElementById('number');
  
  if(myInput.value == 1) {
    window.location.href = 'https://csgotradeup.org/tradeups/9324ec1'
    alert(1);
  }
}

Here is the HTML:

<div class="Searchbox">
  <form onsubmit="myFormSubmit()">
    <input type="number" class="input" placeholder="What is your budget?" min="0" id="number"
  </form>
</div>
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!