473,327 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

cannot execute code from freed script

10
I have one main page which contains two iframes say 'leftpanel' and 'content'. leftpanel contain page which has tree in it.
Now whenever i clikc on the partiucular node the pages in the 'content' changes accordingly.
But dont know why whenever i clicks on the node in tree it gives error cannot execute code from freed script. Only in IE 6.
Can anyone help me with that?
Aug 30 '07 #1
8 8018
gits
5,390 Expert Mod 4TB
hi ...

please post some source-code that is related to the problem or a link to a testpage ...

kind regards
Aug 30 '07 #2
shrik
10
hi ...

please post some source-code that is related to the problem or a link to a testpage ...

kind regards

[HTML]<tr>
<td height="100%" align="left" valign="top" bgcolor="#FFFFFF">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" valign="top">
<td width="6" height="100%" rowspan="2" background="./img/matt_l.jpg">&nbsp;</td>
<!-- td having leftpanel code -->
<td height="100%" width="233" class="td_strach_bg" valign="top">
<table width="233" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="100%" align="center">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<br>
<td height="100%" width="233" colspan="2" align="center" valign="top">
<iframe src="leftpanel.html" name="leftpanel" id=leftpanel width="233" height="100%" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="No" style="overflow:auto;"></iframe>

<!-- <div dojoType="LayoutContainer"
layoutChildPriority='none'
style="border: 2px solid black; width: 90%; height: 100%; padding: 10px;">
<div dojoType="LinkPane" id='linkPane' layoutAlign="left" style="background-color: #b39b86; height: 100%; width:100%;" href="leftpanel.html" executeScripts="true">
</div> </div> -->

</td>
</tr>
</table>




</td>
</tr>
</table>
</td>
<td width="5" height="100%" rowspan="2" background="./img/partition.jpg">&nbsp;</td>
<td height="100%" rowspan="2">
<table height="100%" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="37" align="left" valign="top" background="./img/nav_bg.jpg" class="menu_td_bg" >
<table border="0" align="left" cellpadding="0" cellspacing="0" class="but">
<tr>
<td align="center" valign="middle" ><a href="#" onclick="loadLink('content', 'home.html')">Home</a></td>
<td width="2" height="30"><img src="./img/nav_partition.jpg" width="2" height="30"></td>
<td width="90" height="30" align="center" ><a href="#" name="link9" id="link4" onMouseOver="MM_showMenu(window.mm_menu_0711145406 _0,-2,33,null,'link9')" onMouseOut="MM_startTimeout();">View</a></td>
<!--
<td width="2" height="30"><img src="./img/nav_partition.jpg" width="2" height="30"></td>
<td width="90" height="30" align="center" ><a href="#" name="link5" id="link3" onMouseOver="MM_showMenu(window.mm_menu_0711144400 _0,-2,33,null,'link5')" onMouseOut="MM_startTimeout();">Preferences</a></td>
-->
<td width="2" height="30"><img src="./img/nav_partition.jpg" width="2" height="30"></td>
<td width="90" height="30" align="center" ><a href="#" name="link6" id="link1" onMouseOver="MM_showMenu(window.mm_menu_0711144856 _0,-2,33,null,'link6')" onMouseOut="MM_startTimeout();">Help</a></td>
<td width="2" height="30"><img src="./img/nav_partition.jpg" width="2" height="30"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="100%" align="center" valign="center" bgcolor="#FFFFFF">
<IFRAME ID="content" NAME="content" ALIGN="center" VSPACE=0 HSPACE=0 WIDTH="100%" HEIGHT="100%" SRC="home.html" FRAMEBORDER="0" style="overflow:auto;">
</IFRAME>
</td>
</tr>
</table>
</td>
<td width="6" height="100%" rowspan="2" align="right" background="./img/matt_r.jpg">&nbsp;</td>
</tr>[/HTML]




Above is the code which contains two iframes.
Aug 30 '07 #3
shrik
10
hi ...

please post some source-code that is related to the problem or a link to a testpage ...

kind regards
This is the content of home.html


[HTML]<body onload="home_select_root_node();" onmousedown="window.top.leftpanel.closeMenu1();">
<script type="text/javascript" src="./resources/libs/dojo/version.4.1/dojo.js"> </script>
<script type="text/javascript" src="./javascript/common.js"></script>
<script type="text/javascript" src="./javascript/main.js"></script>
<script type="text/javascript">
dojo.require("dojo.widget.TabContainer");
dojo.require("dojo.widget.Tooltip");
dojo.require("dojo.widget.LinkPane");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.widget.Button");
</script>

<div id="mainTabContainer" dojoType="TabContainer" style="width: 100%; height: 100%;">
<div id="initialTab" dojoType="ContentPane" href="nhostsproperties.html" label="Properties" executeScripts="true"></div>
<div id="tab2" dojoType="ContentPane" href="record.html" label="Record" executeScripts="true"></div>
<div id="tab3" dojoType="ContentPane" href="replay.html" label="Replay1" executeScripts="true"></div>
</div>

</body>[/HTML]
Aug 30 '07 #4
shrik
10
hi ...

please post some source-code that is related to the problem or a link to a testpage ...

kind regards

MY leftpanel.html contains dojo tree having nodes as
parentnode
---->child A
--------subchild of A
-----> child B


So when i clicks on node A the home.html is loaded in that content iframe.
ANd when clicks on subchild of A node another page called properties.html loaded in content iframe. But when i clicks on child A then it gives error can not execute code from freed script
Aug 30 '07 #5
gits
5,390 Expert Mod 4TB
hi ...

after a first quick look there are some things to mention:

1. fixt the id assignment - put qoutes here to: id="leftpanel"

[HTML]<iframe src="leftpanel.html" name="leftpanel" id=leftpanel width="233" height="100%" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="No" style="overflow:auto;"></iframe>[/HTML]

2. can you find out what the closeMenu(); in onmousedown is doing?

3. do you have a testpage ready? how does the leftpanel.html looks like?

kind regards
Aug 30 '07 #6
pbmods
5,821 Expert 4TB
Heya, Shrik.

Try putting all your <script> includes in the main page that contains all of the iFrames.

"Cannot execute code from a freed script." occurs when you reference a function or class in a file that was attached to a page that is no longer loaded.

When you declare a function or class, the browser loads the code into memory and creates a reference to that memory location in the form of a JavaScript variable which it then (usually) attaches to the global window object.

When you close the page (or frame) that contains that JavaScript code, the browser frees the memory that it was using to hold the variables and functions declared in that script.

It's interesting that the reference remains in Internet Explorer when the code that it references has been gc'ed.
Aug 30 '07 #7
shrik
10
Let me clarify scenario in front of you all.

Here is my leftpanel page code

[HTML] <html>
<head>
<title>nHosts Manager </title>
<script type="text/javascript" src="./resources/libs/dojo/version.4.1/dojo.js"> </script>
<script type="text/javascript" src="./javascript/common.js"></script>
<script type="text/javascript" src="./javascript/main.js"></script>
<script type="text/javascript" src="./javascript/leftpanel.js"></script>
<script type="text/javascript">
dojo.require("dojo.lang.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.Tree");
dojo.require("dojo.widget.TreeNode");
dojo.require("dojo.event.*");
dojo.require("dojo.widget.TreeSelector");
dojo.require("dojo.widget.TreeRPCController");
dojo.require("dojo.widget.TreeContextMenu");
dojo.require("dojo.widget.TreeLoadingController");
dojo.require("dojo.widget.TreeControllerExtension" );
dojo.require("dojo.widget.Dialog");
dojo.hostenv.writeIncludes();
</script>

</head>

<body onload="call_loadtree();" onmousedown="closeMenu();" bgcolor="">

<div id="loading">Loading...</div>
<div dojoType="TreeContextMenu" toggle="explode" contextMenuForWindow="false" widgetId="treeContextMenu">
<div dojoType="TreeMenuItem" treeActions="disable" icornSrc="" widgetId="disableport" Caption="Disable"></div>
<div dojoType="TreeMenuItem" treeActions="enable" iconSrc="" widgetId="enableport" Caption="Enable"></div>
</div>
<div dojoType="dialog" id="process" bgColor="blue" bgOpacity="0.3" toggle="fade" toggleDuration="250" >
Wait while process completes....
</div>
</body>
</html>
[/HTML]The leftpanel.js is as follows

Expand|Select|Wrap|Line Numbers
  1. function call_loadtree()
  2. {
  3.         getHttpRequest() ;
  4.         xmlHttpRequest.onreadystatechange = leftpanel_load_tree_handleResponse;
  5.         sendRequest("controllerServlet?cal_show_ports"); 
  6. }
  7.  
  8. function leftpanel_load_tree_handleResponse()
  9. {
  10.         if (xmlHttpRequest.readyState == 4) 
  11.         {
  12.           var response = xmlHttpRequest.responseText;
  13.           var treeController = dojo.widget.createWidget("TreeLoadingController", {id:"treeController",DNDcontroller:"create",RPCUrl:"controllerServlet?1"});
  14.           var treeSelector   = dojo.widget.createWidget("TreeSelector", {id: "treeSelector"});
  15.           var tree = dojo.widget.createWidget("Tree", {toggle: "fade",id:"dojo_tree0",selector:"treeSelector",DNDMode: "between",controller:"treeController",expandLevel:"1",DNDacceptTypes:"dojo_tree0",menu:"treeContextMenu"});                    
  16.           var rootNode = dojo.widget.createWidget("TreeNode", {title: "nHosts",id: "root", expandLevel:"1",childIconSrc: "",actionsDisabled: "disable enable"});
  17.           document.body.appendChild(treeController.domNode);
  18.           document.body.appendChild(treeSelector.domNode);
  19.           document.body.appendChild(tree.domNode);
  20.           tree.addChild(rootNode);
  21.  
  22.           if(response!=null)
  23.           {
  24.             var start_pos=1;
  25.             var counter=0;
  26.             while(1)
  27.             {
  28.                  start_pos=response.indexOf("(",start_pos);
  29.                  if(start_pos<0)
  30.                     break;
  31.                  start_pos++;
  32.                  str=response.substring(start_pos,start_pos+4);
  33.                  var name="Physical Port "+counter;
  34.                  var node0 = dojo.widget.createWidget("TreeNode", {title: name, id:str,  expandLevel:"1",childIconSrc:"./img/port_icon.gif",actionsDisabled: "",isFolder: "true"});
  35.                  rootNode.addChild(node0);
  36.                  counter++;
  37.  
  38.               }//end of while
  39.           }//end of if response
  40.  
  41.           var selectedEventName = dojo.widget.byId("dojo_tree0").selector.eventNames.select;
  42.           var eventSub = new Subscriber(document.getElementById("content"));
  43.           var selectionTopic = dojo.event.topic.getTopic(selectedEventName);
  44.           selectionTopic.subscribe(eventSub, "update");
  45.           var myTree=dojo.widget.manager.getWidgetById("dojo_tree0");
  46.  
  47.           if( myTree != null )
  48.           {
  49.              dojo.event.topic.subscribe(myTree.eventNames.treeClick, treeNodeClicked);
  50.              dojo.event.topic.subscribe(myTree.eventNames.titleClick, onTitleClick);
  51.              dojo.event.topic.subscribe(myTree.eventNames.iconClick, onIconClick);
  52.            }    
  53.  
  54.          document.getElementById("loading").style.visibility="hidden";
  55.          document.getElementById("loading").style.height=0;       
  56.          var node=dojo.widget.byId("root");
  57.          node.onTitleClick();
  58.     }//end of readystate
  59. }//end of handleresponse
  60.  
Expand|Select|Wrap|Line Numbers
  1. function onTitleClick(treenode)
  2. {
  3.  
  4.  
  5. function onIconClick(treenode)
  6. {
  7.       var id=treenode.source.id;
  8.       if( id== "root" )
  9.       {
  10.          loadLink('content','home.html');
  11.       }
  12.       else if ( id.charAt(0) == "p"  )
  13.       {
  14.          loadLink('content','physicalport.jsp?param1='+id);
  15.       }
  16.       else 
  17.       {
  18.          loadLink('content', 'vport.jsp?param1='+id);
  19.       }
  20.  
  21.  
  22. function treeNodeClicked(treenode)
  23. {
  24.     if(treenode.source.children.length == 0)
  25.     {
  26.            getHttpRequest() ;
  27.         //     alert( treenode.source.id);
  28.  
  29.            var command="cal_show_ports -"+treenode.source.id+" -svp";
  30.            sendRequest1("controllerServlet?"+command,"leftpanel_handleResponse"); 
  31.  
  32.            if (xmlHttpRequest.readyState == 4) 
  33.            {
  34.               response = xmlHttpRequest.responseText;
  35.  
  36.               response=response.split("\n");
  37.               for(i=5;i<response.length;i++)
  38.               {
  39.                 if(response[i].indexOf("vp")>=0)
  40.                 {
  41.                  output=response[i].split(/\s*\s/);
  42.                  name=output[0]+" "+output[1];
  43.                  id_value=output[1];
  44.                  var icon_name=dojo.widget.byId(treenode.source.id).childIconSrc;
  45.                  if( (icon_name.search(/red.jpg/)>=0) || (output[3]=="Disabled") )
  46.                    var node1 = dojo.widget.createWidget("TreeNode", {title: name, id:id_value,  expandLevel:"0",childIconSrc: "./img/red.jpg",actionsDisabled: "disable"});
  47.                  else
  48.                  {
  49.                   var node1 = dojo.widget.createWidget("TreeNode", {title: name, id:id_value,  expandLevel:"0",childIconSrc: "./img/port.jpg",actionsDisabled: "enable"});
  50.                   flag=1;
  51.                  }
  52.                dojo.widget.byId(treenode.source.id).addChild(node1);
  53.  
  54.                 }//end of if
  55.               }//end of for
  56.  
  57.                 if (!treenode.source.isExpanded)
  58.                  {            
  59.                      treenode.source.expand();
  60.                  }    
  61.         }//end fo readystateif
  62.   }//end fo childdrne==0if 
  63. }//end of treenode clicekd
  64.  
Expand|Select|Wrap|Line Numbers
  1. function sendRequest2(url, callback)
  2. {    
  3.         if(window.ActiveXObject)
  4.         {
  5.            xmlHttpRequest.open('GET', url,false);
  6.         }
  7.         else
  8.         {
  9.           xmlHttpRequest.open('GET', url,false);
  10.         }
  11.               // set the callback function //
  12.          xmlHttpRequest.onreadystatechange = handleResponse2;
  13.          // execute the GET //
  14.          xmlHttpRequest.send(null);                    
  15. }
  16.  
  17. function handleResponse2(com)
  18. {
  19. }
  20.  
  21. function Subscriber(displayNode)
  22. {
  23.         this.update= function(message)
  24.         { <!--alert(message.node.title+" selected");-->
  25.                 if( message.node.id == "root" )
  26.                 {
  27.                         loadLink('content','home.html');
  28.                 }
  29.                 else if ( message.node.title.charAt(0) == "P"  )
  30.                 {
  31.                         loadLink('content','physicalport.jsp?param1='+message.node.id);
  32.                 }
  33.                 else 
  34.                 {
  35.                         loadLink('content', 'vport.jsp?param1='+message.node.id);
  36.                 }
  37.         }
  38. } //end of function       
  39.  
  40.  
  41.           //this function is called by vport.jsp page to expand the tree and given treenode selected
  42.  
  43. function call_expand(id,pid)
  44. {
  45.           var pnode=dojo.widget.byId(pid);
  46.  
  47.           if(pnode.children.length==0)  //that is tree childs are not generated. SO generate it.
  48.           {
  49.             getHttpRequest() ;
  50.             var command="cal_show_ports -"+pid+" -svp";
  51.             sendRequest1("controllerServlet?"+command,"leftpanel_handleResponse");
  52.  
  53.             if (xmlHttpRequest.readyState == 4) 
  54.             {
  55.               response = xmlHttpRequest.responseText;
  56.               response=response.split("\n");
  57.               for(i=5;i<response.length;i++)
  58.               {
  59.                 if(response[i].indexOf("vp")>=0)
  60.                 {
  61.                  output=response[i].split(/\s*\s/);
  62.                  name=output[0]+" "+output[1];
  63.                  id_value=output[1];
  64.                  var icon_name=pnode.childIconSrc;
  65.                  if( (icon_name.search(/red.jpg/)>=0) || (output[3]=="Disabled") )
  66.                    var node1 = dojo.widget.createWidget("TreeNode", {title: name, id:id_value,  expandLevel:"0",childIconSrc: "./img/red.jpg",actionsDisabled: "disable"});
  67.                  else
  68.                  {
  69.                    var node1 = dojo.widget.createWidget("TreeNode", {title: name, id:id_value,  expandLevel:"0",childIconSrc: "./img/port.jpg",actionsDisabled: "enable"});
  70.                    flag=1;                
  71.                  }   
  72.                 pnode.addChild(node1);
  73.  
  74.                 }//end of if
  75.               }//end of for
  76.             }//end fo readystateif
  77.  
  78.           }//end of children length==0
  79.  
  80.           if (!pnode.isExpanded)
  81.           {            
  82.            pnode.expand();
  83.           } 
  84.           var node=dojo.widget.byId(id);
  85.           var tree=dojo.widget.byId("root");
  86.           node.onTitleClick();
  87. }//end of function
  88.  
Expand|Select|Wrap|Line Numbers
  1. function leftpanel_handleResponse(com)
  2. {
  3. }
  4.  
  5. function sendRequest1(url, callback)
  6. {    
  7.             if(window.ActiveXObject)
  8.             {
  9.                xmlHttpRequest.open('GET', url,false);
  10.             }
  11.             else
  12.             {
  13.                xmlHttpRequest.open('GET', url,false);
  14.             }
  15.             xmlHttpRequest.onreadystatechange = leftpanel_handleResponse;
  16.             xmlHttpRequest.send(null);                    
  17. }
  18.  
  19.  
  20. function function_called_from_main_page()
  21. {
  22.          var node=dojo.widget.byId("root");
  23.          if(node!=null)
  24.            node.onTitleClick();
  25. }
  26.  
  27. function closeMenu()
  28. {
  29.    if(!dojo.widget.PopupManager.currentFocusMenu)
  30.    {
  31.      dojo.widget.PopupManager.onClick('onClick');
  32.    }
  33. }
  34.  
  35. function closeMenu1()
  36. {
  37.     dojo.widget.PopupManager.onClick('onClick');
  38. }
  39.  
  40.  
  41.  
  42.       dojo.addOnLoad(function() {
  43.           dojo.event.topic.subscribe('tcmReadWriteLoad/engage',
  44.                      function (menuItem) 
  45.                      {
  46.                        alert("Read Write loda menud clicked");
  47.                      }
  48.                );
  49.  
  50.  
  51.                dojo.event.topic.subscribe('disableport/engage',
  52.                     function(menuItem)
  53.                     {
  54.                       var id=menuItem.getTreeNode().id;
  55.  
  56.  
  57.                       check_id=id.charAt(0);
  58.  
  59.                       if(check_id!="p")
  60.                       {
  61.                         getHttpRequest() ;
  62.                         var command="cal_manage_ports -vp "+id+" disable";
  63.                         sendRequest2("controllerServlet?"+command,"handleresponse2"); 
  64.                         if (xmlHttpRequest.readyState == 4) 
  65.                         {
  66.                          response = xmlHttpRequest.responseText;
  67.                          if(response!=null)
  68.                          {
  69.                           response=response.split("\n");
  70.                           var txt="VP "+id+" disabled";
  71.                           if(response[2].indexOf(txt)>=0)
  72.                           {
  73.                             menuItem.getTreeNode().childIconSrc='./img/red.jpg';
  74.                             menuItem.getTreeNode().actionsDisabled="disable";
  75.                           }
  76.                           else
  77.                             alert("Error while disabling VP "+id);
  78.                          } 
  79.                         }  
  80.                       }//end of if 
  81.                       else
  82.                       {
  83.                        dlg = dojo.widget.byId("process");
  84.                        dlg.show();
  85.                        var node1=dojo.widget.byId(id);
  86.  
  87.                        for(var i=0;i < node1.children.length; i++)
  88.                        {
  89.                           getHttpRequest();
  90.                           id=node1.children[i].widgetId;
  91.                           child_icon= dojo.widget.byId(id).childIconSrc;
  92.                           if(child_icon.indexOf("./img/red.jpg")<0)
  93.                           {
  94.                              var command="cal_manage_ports -vp "+id+" disable";
  95.                              sendRequest2("controllerServlet?"+command,"handleresponse2"); 
  96.                              if (xmlHttpRequest.readyState == 4) 
  97.                              {
  98.                               response = xmlHttpRequest.responseText;
  99.                               if(response!=null)
  100.                               {
  101.                                response=response.split("\n");
  102.                                var txt="VP "+id+" disabled";
  103.  
  104.                                if( (response[2].indexOf(txt)>=0) || (response[2].indexOf("WARNING: VP "+id+" is already Disabled")>=0)     )
  105.                                {
  106.                                 var child_node= dojo.widget.byId(id);
  107.                                 child_node.childIconSrc='./img/red.jpg';
  108.                                 child_node.actionsDisabled="disable";
  109.                                 child_node.buildChildIcon();
  110.                                 child_node.updateIcons();
  111.                               //  child_node.initialize();
  112.                                }
  113.                                else
  114.                                 alert("Error while disabling VP "+id);
  115.                               }//end of if response not null
  116.                             }//end ready state if   
  117.                          }//end of if   
  118.                       }//end of for
  119.  
  120.                           dlg.hide();
  121.                       }//end of else  
  122.  
  123.                       menuItem.getTreeNode().buildChildIcon();
  124.                       menuItem.getTreeNode().updateIcons();
  125.                  //   menuItem.getTreeNode().initialize();
  126.                     }
  127.                );
  128.  
  129.                dojo.event.topic.subscribe('enableport/engage',
  130.                     function(menuItem)
  131.                     {
  132.                       var id=menuItem.getTreeNode().id;
  133.                       check_id=id.charAt(0);
  134.                       if(check_id!="p")
  135.                       {
  136.                         getHttpRequest() ;
  137.                         var command="cal_manage_ports -vp "+id+" enable";
  138.                         sendRequest2("controllerServlet?"+command,"handleresponse2"); 
  139.                         if (xmlHttpRequest.readyState == 4) 
  140.                         {
  141.                          response = xmlHttpRequest.responseText;
  142.                          if(response!=null)
  143.                          {
  144.                           response=response.split("\n");
  145.                           var txt="VP "+id+" enabled";
  146.                           if(response[2].indexOf(txt)>=0)
  147.                           {
  148.                             menuItem.getTreeNode().childIconSrc='./img/port.jpg';
  149.                             menuItem.getTreeNode().actionsDisabled="enable";
  150.                           }
  151.                           else
  152.                             alert("Error while enabling VP "+id);
  153.                          }//end of response not null if 
  154.                         }//end of ready state if  
  155.                       }//end of if
  156.                       else
  157.                       {
  158.                         dlg = dojo.widget.byId("process");
  159.                         dlg.show();
  160.                         var node1=dojo.widget.byId(id);
  161.                         for(var i=0;i < node1.children.length; i++)
  162.                         {
  163.                           getHttpRequest();
  164.                           id=node1.children[i].widgetId;
  165.                           child_icon= dojo.widget.byId(id).childIconSrc;
  166.                           if(child_icon.indexOf("./img/port.jpg")<0)
  167.                           {
  168.                             var command="cal_manage_ports -vp "+id+" enable";
  169.                             sendRequest2("controllerServlet?"+command,"handleresponse2"); 
  170.                             if (xmlHttpRequest.readyState == 4) 
  171.                             {
  172.                               response = xmlHttpRequest.responseText;
  173.                               if(response!=null)
  174.                               {
  175.                                response=response.split("\n");
  176.                                var txt="VP "+id+" enabled";
  177.                                if( (response[2].indexOf(txt)>=0) || (response[2].indexOf("WARNING: VP "+id+" is already Enabled")>=0) )
  178.                                {
  179.                                 var child_node= dojo.widget.byId(id);
  180.                                 child_node.childIconSrc='./img/port.jpg';
  181.                                 child_node.actionsDisabled="enable";
  182.                                 child_node.buildChildIcon();
  183.                                 child_node.updateIcons();
  184.                            //     child_node.initialize();
  185.                                }
  186.                                else
  187.                                 alert("Error while enabling VP "+id);
  188.                              }//end of if response not null
  189.                            }//end ready state if   
  190.                          }//end of if   
  191.                        }//end of for
  192.  
  193.                       dlg.hide();
  194.                     }  
  195.                     menuItem.getTreeNode().buildChildIcon();
  196.                     menuItem.getTreeNode().updateIcons();
  197.                   //  menuItem.getTreeNode().initialize();
  198.                   }
  199.                );     
  200.                dojo.event.topic.subscribe('tcmErrorInjection/engage',
  201.                      function (menuItem)
  202.                      {
  203.                       alert("Error injection called");
  204.                      }
  205.                );
  206.  
  207.                });
  208.  
My home.html which is loaded in content tag is as follows

[HTML]<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>nHosts Manager</title>
<script type="text/javascript" src="./resources/libs/dojo/version.4.1/dojo.js"> </script>
<script type="text/javascript" src="./javascript/common.js"></script>
<script type="text/javascript" src="./javascript/main.js"></script>
<script type="text/javascript">
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.TabContainer");
dojo.require("dojo.widget.Tooltip");
dojo.require("dojo.widget.LinkPane");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.widget.Button");
</script>
<link rel="stylesheet" type="text/css" href="./css/tabbed_page.css" />
</head>
<body onload="" onmousedown="window.top.leftpanel.closeMenu1();">
<div id="mainTabContainer" dojoType="TabContainer" style="width: 100%; height: 100%;" selectedChild="tab1">
<div id="tab1" dojoType="ContentPane" href="nhostspropframe.html" refreshOnShow="true" label="Properties"></div>
<div id="tab2" dojoType="ContentPane" href="recordframe.html" refreshOnShow="true" label="Record"></div>
<div id="tab3" dojoType="ContentPane" href="replayframe.html" refreshOnShow="true" label="Replay"></div>

</div>


</body>
</html>

[/HTML]and the nhostspropframe.html,recordframe.html,replayframe. html
are the pages that contains the iframes which loads respective record, replay pages.
The home.html is loaded in the "main.jsp" frame when we clicks on the root node of the tree in "leftpanle.html". Leftpanel.html is loaded into another iframe in "main.jsp"
When we click on first level childs of root node the page physical properties is loaded which is quite similar to home.html. except file loaded are different.
It is as follows
[HTML]<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>nHosts Manager </title>
<script type="text/javascript" src="./resources/libs/dojo/version.4.1/dojo.js"></script>
<script type="text/javascript" src="./javascript/common.js"></script>
<script type="text/javascript" src="./javascript/main.js"></script>
<script type="text/javascript">
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.TabContainer");
dojo.require("dojo.widget.Tooltip");
dojo.require("dojo.widget.LinkPane");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.widget.Button");
</script>
<link rel="stylesheet" type="text/css" href="./css/tabbed_page.css" />

</head>
<body onmousedown="window.top.leftpanel.closeMenu1();">
<div id="mainTabContainer" dojoType="TabContainer" style="width: 100%; height: 100%;" selectedChild="tab1">
<div id="tab1" dojoType="ContentPane" href="propertiesframe.jsp?param1=<%=request.getPar ameter("param1")%>" refreshOnShow="true" label="Properties"></div>
<div id="tab2" dojoType="ContentPane" href="ppframe.jsp?param1=<%=request.getParameter(" param1")%>" refreshOnShow="true" label="Ports" ></div>
<div id="tab3" dojoType="ContentPane" href="targetsframe.jsp?param1=<%=request.getParame ter("param1")%>" refreshOnShow="true" label="Targets"></div>
<div id="tab4" dojoType="ContentPane" href="statsframe.jsp?param1=<%=request.getParamete r("param1")%>" refreshOnShow="true" label="Statistics"></div>
<div id="tab5" dojoType="ContentPane" href="alllunsframe.jsp?param1=<%=request.getParame ter("param1")%>" refreshOnShow="true" label="Port-LUNs"></div>
</div>

</body>
</html>
[/HTML]So this is the scenario.

I also tried to put all of my javascript in one location that is in main.js
Then i included this file in my main page "main.jsp" which contains both the iframes. But still its giving error me that cannot execute code from freed script. On mozilla it works fine. But IE gives such error.

Close menu closes menu if any highlighted by right mouse clicking on tree.
Aug 31 '07 #8
acoder
16,027 Expert Mod 8TB
Please use CODE tags when posting code. Read the posting guidelines, in particular the section on using code tags
Aug 31 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: nc | last post by:
My iterator can find my collection when my Action class calls my jsp directly, however when my Action class calls an html file that is set up with IFrames (one of which is loading that same jsp), I...
5
by: M P | last post by:
Hi Team! Hope that you could help me! Its been days since I made this script but I cannot fix the problem! IE is prompting me that there is a Syntax Error but it seems that the syntax is OK! Can...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
3
by: Lyle Fairfield | last post by:
MS-SQL Server utilities Enterprise Manager and Query Analyzer will model almost any MS-SQL object as a simple script file with a default ".sql" extension. But how to "run these files? They are...
4
by: frank | last post by:
I posted a question before (to too many groups) and this time I am sending to this group only. I have a quick script as seen below, the file_list table has a unique field called file_name. The...
5
by: Thor W Hammer | last post by:
Hello all, Is it possible to find out if a script is freed? This is actual when having a pointer to a function and should determine if it is freed so we don't call it and get error.. TWH
5
by: batham | last post by:
Hi Gurus, How can I execute a script during runtime. Here is my code, so how do I execute the new script during runtime which should be a part of the 'topDiv'. Thanks Help is appreciated. -...
0
by: oliver | last post by:
QUESTION: How to access an object embedded in a UserControl through Javascript file? Another way to ask this question: How to execute script from a UserControl, accessing other objects in that...
2
by: maya | last post by:
hi, I keep getting this error, "can't execute code from a freed script" when I go to another page (i.e., upon UNLOAD..) this error occurs only in IE, not FF (what a surprise.....;) what is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.