Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1709 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

Prototype - Iteration

Thread title: Prototype - Iteration
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
11-28-2007, 12:30 AM
#1
Haris is offline Haris
Status: Request a custom title
Join date: Dec 2005
Location:
Expertise:
Software:
 
Posts: 2,741
iTrader: 9 / 100%
 

Haris is on a distinguished road

  Old  Prototype - Iteration

HTML Code:
<table border="1" style="display: none;" id="table">
	<tr>
		<th>Com</th>
		<th>Net</th>
		<th>Org</th>
		<th>Us</th>
		<th>Biz</th>
		<th>Info</th>
		<th>Co.uk</th>
		<th>Org.uk</th>
		<th>Tv</th>
		<th>In</th>
	</tr>
	<tr>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
</table>
I have one table, two table rows. The first table row consists table headers and the second one WILL contain table data (currently they are blank).

I want to update the second table row, table data from an array.

It's an JSON array generated through Ajax query.

It is certainly not a good way to add id to each td and then update each table data with each line of code.

I'm thinking about iterating the query (like foreach query from PHP) via JSON array and updating the table data. First thing I need to do is to select the second table row from the table, then update the table data.

I'm not sure how to do it since I'm a beginner in javascript.

P.S: Using Prototype

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed