Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table, can it be deleted? changes ? 2

Status
Not open for further replies.

horev

Programmer
Feb 17, 2006
18
0
0
IL
Hi !
I'm having a table in my html page. Above the table: a banner.
Clicking on an item of that banner should upload a new table.
I want the new table to upload but the banner and the rest of the page, except the table to remain.
Is it possible to delete a table and make a new one instead ? What should i do to keep the page as it is and only change the table ? Is it possible to change it partially, namely, only few cells and not all the cells ?
Thanks !
 
You could use XMLHTTPRequest to get the new data for the table. Then look into the document.createElement and replaceNode methods. They can be used to replace everything from the entire page to a single table cell, or even just the contents of a table cell.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Thank you in the first place.
But, could you make your notification more detailed ?
What language is that script ? Is it html ? Because i never used that kind of synthax in html.
And thanks again.
 
Three ways of doing it:

1) Follow Tracy's advice and use Javascript to manipulate the page directly. As a programmer you shouldn't find it too challenging. However, if your visitors switch Javascript off in their browsers (and some do) your page won't work. The data in your tables will not be visible to search engines.

2) Use (i)frames to contain the tables. This is simpler to implement, as it uses built-in browser functionality. However, there are some disadvantages to using frames that we've debated at some length, and with much heat, in the past.

3) Just build several html pages (or generate them dynamically) each with the same banner and different tables. The links in the banner just become regular links to the other pages. Sure, the banner etc. reload as well as the content, but does that really matter? This is the simplest and least problematic solution.

I'd go with option 3, but it's your call.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thank you chrishunt!
Now i]m having the whole picture !
Thanks a lot !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top