A button on the main page calls Panel() which gets the html from PANEL.php This is then displayed in a div on the main page. all the html shows up fine, but the javasript does not work in ie. Works fine in FF.
//**********function that gets the html that we need ****
- function Panel () {
-
-
var returnajax = function(o){
-
//returned response is html
-
var html = o.responseText;
-
YAHOO.namespace("example.container");
-
-
YAHOO.callhome.container.panel = new YAHOO.widget.Panel("panel");
-
-
YAHOO.example.container.panel.setBody(html);
-
YAHOO.example.container.panel.render(document.body);
-
-
}
-
//handle the return
-
var handle_return =
-
{
-
success:returnajax
-
};
-
-
var url = "PANEL.php";
-
-
//get the html from PANEL.php
-
var get_callhome = YAHOO.util.Connect.asyncRequest('GET', callhomeurl, handle_return);
-
}
-
*********************
PANEL.php**********
[PHP]// php page used for returning the html
echo <<< EOT;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>
<script type="text/javascript" src="application/scripts/testscript.js"></script>
<link rel="stylesheet" href="password.css" type = "text/css">
</head>
<body>
<div id="buttons">
<center>
<button class="inputbutton" type="button"id="button1" onclick="test()">New User</button>
</center>
</div>
</body>
</html>
EOT;
[/PHP]**************
application/scripts/testscript.js*******
- //function in testscript.js
-
function test() {
-
alert("hello");
-
}
-
************************************************** ***************