-
14 Sep 2007 12:40 PM #1
Code won't work in IE7, no JS errors, just doesn't work
Code won't work in IE7, no JS errors, just doesn't work
I have some EXT code consisting of a layout and tree, the code runs fine in firefox and camino but when I view it in IE7, it doesn't appear to execute the js. I know js is turned on as I added a basic alert and that kicked off. My page is an https page and when I go to it I get the IE error of "this page contains secure and non secure..blah". When my page is loaded in IE7, I just see the dcsafdsa.... Here is my page code. Any suggestions are greatly appreciated! Thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>mysite</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="/js/ext-1.1/adapter/ext/ext-base.js"></script>
<link rel="stylesheet" type="text/css" href="/js/ext-1.1/resources/css/ext-all.css" />
<script type="text/javascript" src="/js/ext-1.1/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="/js/ext-1.1/adapter/yui/ext-yui-adapter.js"></script>
<script src="/js/jquery.js"></script>
<script src="/js/ext-1.1/ext-all.js"></script>
<script type="text/javascript">
var tree_data = /*json data removed for posting*/
var sessionId = "goblygooko";
</script>
<script type="text/javascript" src="/js/monitors/monitor_forms.js"></script>
</head>
<body>
<div id ="container">
<div id="west" class="x-layout-inactive-content">
<div id="tree"></div>
</div>
<div id="center1" class="x-layout-inactive-content">
dcsafdsafdasfdas
</div>
</div>
</body>
</html>
And here is my monitor_forms.js
function showDetails(id) {
params = {
"PHPSESSID": sessionId,
"id": id,
"detail":"1",
}
$.get("monitors_detail.adm", params, function(content) {
$("#center1").html(content);
});
}
Ext.onReady(function(){
/**
* The layout, we just need a west and center for now
*
*
*/
layout = new Ext.BorderLayout(document.body, {
west: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true
},
center: {
titlebar: true,
autoScroll:true,
closeOnTab: true
}
});
layout.beginUpdate();
layout.add('west', new Ext.ContentPanel('west', {title: 'MSR List'}));
layout.add('center', new Ext.ContentPanel('center1', {title: 'Details', closable: true}));
layout.getRegion('center').showPanel('center1');
layout.endUpdate();
/**
* The treenode for the employees, this data will come dynamically from the main form
*
*
*/
var Tree = Ext.tree;
var tree = new Tree.TreePanel('tree', {
animate:true,
enableDD:false,
loader: new Tree.TreeLoader(), // Note: no dataurl, register a TreeLoader to make use of createNode()
lines: true,
selModel: new Ext.tree.MultiSelectionModel(),
containerScroll: false
});
// set the root node
var root = new Tree.TreeNode({
text: 'People',
draggable:false,
id:'source'
});
tree.on('click', function(n){
if(n.isLeaf()){
showDetails(n.attributes.id);
}
});
tree.setRootNode(root);
// json data describing the tree
for(var i = 0, len = tree_data.length; i < len; i++) {
root.appendChild(tree.getLoader().createNode(tree_data[i]));
}
tree.render();
root.expand();
});
-
14 Sep 2007 12:50 PM #2
I just took a quick glance at your code and it looks like you've got an extra comma here:
You may want to check out the following thread: do u have extra comma? ok, ie will destroy your application!Code:function showDetails(id) { params = { "PHPSESSID": sessionId, "id": id, "detail":"1", }
This may not be the problem (I took a 30s glance), but it can't help
Cheers,
JC
-
14 Sep 2007 2:59 PM #3
Thanks JC. As soon as I get back to an windows machine, I'll try it out without the extra comma.
Thanks again, it's always good to get another set of eyes!
-
14 Sep 2007 3:56 PM #4
-
17 Sep 2007 4:02 AM #5
I removed the extra comma but the code still does not work. I don't get any type of js errors, it just doesn't seem to process the code. IE7 does seem to complain about certificate errors though as this is a https site but is in a sandbox without a valid certificate.
Thanks!
-
17 Sep 2007 4:11 AM #6
The security errors is probably just due to the ext-all.js file referencing http://extjs.com/s.gif as a spacer image. Had the same problem myself, but was fairly easy to spot.
-
17 Sep 2007 5:06 AM #7
But would that cause IE 6/7 to not process the code? It acts like the js isn't even there yet if I do a basic alert, that is displayed but not my layout and tree.


Reply With Quote
