Hi All!
Can someone help me convert the javascript to get the CLASS and [U]not
for example:
when the link below is clicked it fills in the div below it with the url requested…
[CODE]
<a href=”javascript:details(‘includes/iframe.php?id=1’, ‘tog16’);” onclick=”toggle(‘tog16’);”>[+]</a>
<div id=”tog16″ class=”tog16″> Blah blah blah </div>
the problem is that i have the div id being used by a different javascript function, so i need to use the div class for this function below…
[CODE]
function toggle( targetId ){
if (document.getElementById){
target = document.getElementById( targetId );
if (target.style.display == “none”){
target.style.display = “”;
} else {
target.style.display = “none”;
}
}
}
/***********************************************
* Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var loadedobjects=””
var rootdomain=”http://”+window.location.hostname
function details(url, containerid){
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
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
page_request.open(‘POST’, url, true)
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf(“http”)==-5))
document.getElementById(containerid).innerHTML=page_request.responseText
}
Thanks in advance!