Jump to content

[SOLVED] Controlling content outside an Iframe


imperialized

Recommended Posts

Ok, I've been trying to get this to work with no prevail.

 

What I have is a page with an Iframe, and outside the Iframe I have my menu.

 

Its located in <div id=\"menu\"> 

 

 

When I load my index2.php (the page that people go to after login) it calls:

 

<body onload=\"updateMenu()\">

 

This script calls this:

 

function menu_stateChanged()

{

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{

document.getElementById("menu").innerHTML=xmlHttp.responseText

}

}

 

 

function updateMenu()

{

 

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)

{

alert ("Browser does not support HTTP Request")

return

}

 

url = "menu_check.php";

xmlHttp.onreadystatechange=menu_stateChanged

xmlHttp.open("GET",url,true)

xmlHttp.send(null)

}

 

 

I can't get it to work though, any suggestions?

Ok since it will not let me edit my former post, I switched and tried using the ajax model given here, MyAjaxRequest..

 

I know the problem must be locating the <DIV> that is outside the Iframe.. any help is greatly appreciated. Thanks

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.