Try the below. Inside the .js file, make the following two changes:
Code:
function ajaxpage(url, containerid, targetobj, directBol){
and
Code:
if (typeof directBol=="undefined"){
var ullist=targetobj.parentNode.parentNode.getElementsByTagName("li")
for (var i=0; i<ullist.length; i++)
ullist[i].className="" //deselect all tabs
targetobj.parentNode.className="selected" //highlight currently clicked on tab
if (url.indexOf("#default")!=-1){ //if simply show default content within container (verus fetch it via ajax)
document.getElementById(containerid).innerHTML=defaultcontentarray[containerid]
return
}
}
The code in red is new. Then, inside any of your external pages, create links such as:
Code:
<a href="#" onClick='ajaxpage("external2.htm", "ajaxcontentarea", "", 1); return false'>Load Dog page</a>
where the first parameter is the path to the external page to load, the second is the ID of your content area, the third is just a blank string, and the forth, a value of 1.
Bookmarks