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!

Change Part of a loaded HTML Page

DHTML

Change Part of a loaded HTML Page

by  kpetursson  Posted    (Edited  )
To Change just one part of an HTML page without having to reload the whole page...

In the HTML part:
the section you want to be able to change
<div id="somename">start text optional</div>

In the Javascript:
somename.innerHTML="new text";

When the javascript is excuted the "new text" will replace the "start text optional". If you left out the start text, then the "new text" will push it's way onto the page where you told it to.

Yes it's that simple!

Hope you find this useful.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top