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

230
Views
I cant set the value of a js variable after redirecting to another html

I have a a button with a function that is basically redirectin to another html document and after that is seting up a variable. that is the code

that the function that is redirecting

    function polloCheck() {
  state.type = "aves";
  defaultStatementCategory();
}

/the next function is the addeventlistener************************/

function goCategoryPollo() {
  document.location.href = "categoriaAves.html";
    window.onload.polloCheck();
}

even if put windows.onload.polloCheck, when I do console.log(state.type) the result it's empty string. (state.type = "") that's the result and default statement aswell.

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!