HighDots Forums  

Dynamically Created Table Rows, Accessing Values

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Dynamically Created Table Rows, Accessing Values in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
BenignVanilla
 
Posts: n/a

Default Dynamically Created Table Rows, Accessing Values - 04-28-2006 , 10:27 AM






I have a table in which I am dynamically creating the tbody section from the
database. This works great, but my problem is that I have an edit button on
each row, and I want to call a javascript function that will then take the
cell values and copy them to text boxes to be edited, but I can't see to
access the values in anyway. When I look at the source, the tbody is empty,
but the page displays it.

I am new to this type of solution, so I am sure there is a simple solution,
but I am not sure what do to.

BV.



Reply With Quote
  #2  
Old   
Wayne Dobson
 
Posts: n/a

Default Re: Dynamically Created Table Rows, Accessing Values - 04-28-2006 , 01:24 PM






"BenignVanilla" <bvanilla (AT) tibetanbeefgarden (DOT) com> wrote

Quote:
I have a table in which I am dynamically creating the tbody section from
the
database. This works great, but my problem is that I have an edit button
on
each row, and I want to call a javascript function that will then take the
cell values and copy them to text boxes to be edited, but I can't see to
access the values in anyway. When I look at the source, the tbody is
empty,
but the page displays it.

I am new to this type of solution, so I am sure there is a simple
solution,
but I am not sure what do to.
I don't know what you have done and you haven't given enough information for
anyone to tell where the breakdown has occured. When you get stuck doing
something complicated, it's a good idea to narrow down the area to search,
by testing a simplified version of what you are trying to do, then combing a
small area for the false assumption that is causing the whole thing to fail.

Test the expected values at each stage, so that false assumptions don't have
a chance to propogate. Test, test, test....

When you have tried to extract a value, are you sure that you are
referencing the object that you intend to. Once you think you have the
correct object, doing something like "alert(obj.nodeName)" tells you if you
are referencing the right type of node. Et cetera, et cetera...

--
Wayne
"Aka Dobbie the House Elf."




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.