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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.