If you're concerned that certain content may be clipped due to an explicit height, yes, you could throw in "overflow", such as:
Code:
<div style="border: 1px solid black; height: 200px; overflow-y: scroll">
Regarding your second question, you'd have to modify the function ajaxpage() within the script first:
Code:
function ajaxpage(url, containerid, targetobj, direct){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
if (typeof direct=="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
}
}
document.getElementById(containerid).innerHTML=loadstatustext
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}
The code in red is new. Then, to directly load a page within the content area, try using a link like:
<a href="javascript:ajaxpage('test.htm', 'ajaxcontentarea', '')">Load page</a>
where the first parameter is the path to the page, the 2nd is the id of the content container. This is untested, though it should work.
Bookmarks