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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ajax loading image

Status
Not open for further replies.

snowboardr

Programmer
Joined
Feb 22, 2002
Messages
1,401
Location
PH
I can't seem to get layer1 to show/hide

document.getElementById('Layer1').style.display="";

Code:
var intRow = null;
var LoadPOSTHTMLHttp = null;
function LoadPOSTHtml(_intRow,TopicName) {
    intRow = _intRow;
	document.getElementById('Layer1').style.display="";
    LoadPOSTHTMLHttp = createRequestObject();
    var url2="/ajax/sub_topics.asp?id=" + intRow + "&topic=" + TopicName
    LoadPOSTHTMLHttp.open('GET', url2, true);
    LoadPOSTHTMLHttp.onreadystatechange = getLoadPOSTHTMLHttpResponse;
    LoadPOSTHTMLHttp.send('');
}


function getLoadPOSTHTMLHttpResponse() {
    if (LoadPOSTHTMLHttp != null)
        if (LoadPOSTHTMLHttp.readyState == 4)
            if (LoadPOSTHTMLHttp.status == 200)
                document.getElementById('viewsubtopics'+intRow).innerHTML = LoadPOSTHTMLHttp.responseText;	
				document.getElementById('Layer1').style.display="none";
}

Do you got a million? www.gotamillion.com/?r=T

 
never mind i got it working

Code:
  function showLayer(layerName)
        {
            if (document.getElementById) // Netscape 6 and IE 5+
            {
                var targetElement = document.getElementById(layerName);
                targetElement.style.visibility = 'visible';
            }
        }


        function hideLayer(layerName)
        {
            if (document.getElementById) 
            {
                var targetElement = document.getElementById(layerName);
                targetElement.style.visibility = 'hidden';
            }
        }

Do you got a million? www.gotamillion.com/?r=T

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top