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

82
Views
how to add onchnage event on auto genrated html by javascript?

everyone. I am trying to use an api which is by tom tom places autocomplete. there is a code as below:

    var ttSearchBox = new tt.plugins.SearchBox(tt.services, options);
    var searchBoxHTML = ttSearchBox.getSearchBoxHTML();
    $('#pickup_city').after(searchBoxHTML);

which generates a input field as below in my html code:

<input class="tt-search-box-input" placeholder="">

what i want to add an onchange argument to this input field like this:

  <input class="tt-search-box-input" placeholder="" onchange="myFunction()">

but i dont know how to do it? can anyone tell me how can i achhieve this?

here is the code from js :

 "getSearchBoxHTML", (function() {
            return n._container
        }))

and the n._container is :

n._container = document.createElement("div"), n._container.className = ".tt-search-box", 
 n._inputWrapper = new A(n._container, n.store, n.userActions), n._resultList = new 
 j(n._container, n.store, n.userActions), n._container

Thanks in advance <3

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!