• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Undefined when load table cell to input field

 
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an JSP with table and input fields. To do this I choices Javascript and I saw some tutorials with what I want.
My javascript:

This alert is to see if I getting "codigo de produto" and "descrição de produto" to send to my input fields. This alert show me the cel 0 and cel 1 of line selected but when send to input by innrHTML the input show undefined.

Thanks in advance...
 
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As this has nothing to do with JSP, it's been moved to the HTML/JavaScript forum.

The first step is to use DevTools to set breakpoints and step through your code to see where the variable values start to vary from your expectations.
 
Cezar Apulchro
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No news?
 
Rancher
Posts: 4749
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear suggested what you need to do, using the DevTools for your browser to debug that code and see what values are being used.
 
Cezar Apulchro
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find out the problem but I don't know how to solve. I using EL to load MySql db file into my jsp table, I don't receiving a specific error my javascript are correct.
My table:

Thanks.
 
Cezar Apulchro
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I solve my problrm.
The problem:

The solution:

Thanks.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic