Jump to content

onclick replace div contents ? I am doing correctly?


sayedsohail

Recommended Posts

Hi everyone,

 

I added some hyperlink like tabs in my page and wish to replace the contents div with selected link.  Is there a way i can replace the contents of my <div id="contents">, without refreshing the page.

 

please help, here is my html code, which is calling the ajax function.

 

<div id="navcontainer">
<ul>
<li><a class="home"  href="#" onclick="ajax("home.php");">Add</a></li>
<li><a class="edit"    href="#" onclick="ajax("edit.php");">Edit</a></li>
<li><a class="delete" href="#" onclick="ajax("delete.php");">Delete</a></li>
</ul>
</div> 

<div id="contents" style="visibility:hidden;"></div>

</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.