Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
Inserting a table row - how?

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help
View previous topic :: View next topic  
Author Message
richtpt
New one
New one


Joined: 20 Oct 2007
Posts: 1
Location: Portland, OR

PostPosted: Sat Oct 20, 2007 6:53 am    Post subject: Inserting a table row - how? Reply with quote

I'm new to AJAX and javascript, but have been doing html for a long time.

I've got data that's in a table - field names, formats, display names, etc. I want to have each field name be a link users can click on. When they do, the table row below it will move down and all tables that have that field will be displayed. Also, when they click on another field, I want to hide what was previously displayed then display the new list.

I know how to do everything except the ajax part. I made a blank row between each row of data with a td colspan=5 id=name and used innerhtml to put the info there, but I ran into a problem. I was using href="#" onclick="gettables(fieldname)". When I clicked this, the page reloaded and went back to the top. Also, this made for a blank line between each row of data that I didn't really like.

So knowing what I'd like to accomplish, what's the best way to do this? Manipulating the DOM to insert a table row? Or some other way? Thanks!
Back to top
View user's profile Send private message Yahoo Messenger
Jesdisciple
Frequent Poster
Frequent Poster


Joined: 20 Oct 2007
Posts: 36
Location: Tejas

PostPosted: Sun Oct 21, 2007 5:08 am    Post subject: AJAX might not be needed. Reply with quote

Try <a href="javascript:gettables(fieldname);">. The page shouldn't reload or go to the top; also, your edits in the HTML file will be reflected when you refresh the page (whereas # preserves the old source). Your other complaint ("a blank line between each row of data") might not be solved.
_________________
In ALL things, strive for ><>,
Chris
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert