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

151
Views
Redirect a HTML form and add value from input

I have form where I need to redirect to a new url, and add the value from the input to the new URL

<form action="https://test.test.com/" method="GET">
  <fieldset>
    <legend>bftl</legend>
    <input type="text" name="trackTrace" id="trackTrace" placeholder="Add your Track & Trace">
    <label for="month">Track & Trace</label>
    <input type="submit" class="submit" value="Submit">
  </fieldset>
</form>

After you have enter the Track & Trace number and pressed the submit button you shall be redirected to "https://test.test.com/#/TRACK&TRACENUMBER" in a new tab

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

0

You need js code like this:

<form action="https://test.test.com/" method="GET" onSubmit="return submitForm()">
  <fieldset>
    <legend>bftl</legend>
    <input type="text" name="trackTrace" id="trackTrace" placeholder="Add your Track & Trace">
    <label for="month">Track & Trace</label>
    <input type="submit" class="submit" value="Submit">
  </fieldset>
</form>
<script>
function submitForm() {
    location.href="https://test.test.com/#/TRACK&"+document.getElementById("trackTrace").value;
    return false;
}
</script>
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!