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

73
Views
ASP.NET MVC, Call javascript when rendering, JQuery element become array

I have a javascript function for process event when DropdownList value changed and it is working fine. This function is call other function like get HTML element ID by passing HTML element as parameter. Then I try to call it when page load / page rendering, HTML element being arrayed.

Example:

<script type="text/javascript">
  function A (obj)
  {
    var value = function B (obj);
  }
  
  function B (obj)
  {
    var idLength = obj.id.length;
    var value = obj.id.lastIndexOf("-");
  }
</script>

When I debugging javascript, I see that obj is array, then I must call it obj[0].id (obj.id is undefined). Why it can be ?

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!