View Single Post
Old 09-17-2012, 05:15 PM   PM User | #6
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 848
Thanks: 67
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
Is there anyway to append to a table? I have created my table and table headers in HTML:
Code:
<table id="members_table">
	  <tr>
	      <th>Member No.</th>
	      <th><a href="#" onmouseup="showUser('ASC','username')">Username</a></th>
	      <th><a href="#" onmouseup="showUser('ASC','join_date')">Join Date</th>
	  </tr>
In my php script, I echo each database row into its own table row.

Everytime I click my links, the table headers disappear and it's something to do with writing the innerHTML to the same parent element. How can I fix this problem? I've changed my code many times and haven't found a solution yet.

Regards,

LC.
LearningCoder is offline   Reply With Quote