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

112
Views
Automatically select drop-down after visiting on specific page

I have drop-down list, where user can select any options when they register on my site. I like to make it more easier for example if user vist specific url. They will automatically selected on Publishers opinion when they visit on domain.com/register#publishers

here is my code:

<div class="select_box">
 <select name="registared_as" id="registared_as">
 <option value="0">Students / Experts</option>
 <option value="1">University Academics</option>
 <option value="2">Publishers</option>
 </select>
 </div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If the trigger is an url anchor, like your example with domain.com/register#publishers you can get the url anchor using javascript vanilla like this:

var anchor = window.location.hash.substr(1);

Then, you must select the option, also with javascript:

if (anchor == "publishers") {
     document.getElementById("registared_as").selectedIndex = 2;
}

And so on for each option..

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!