Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mike H on Feb 03, 2009 11:02
open dhtmlx forum
Internet Explorer cannot display the webpage

Hi,

I am trying to get a layout object to work. It works (mostly) in Netscape 7, but when I try to veiw the page in IE 7 i get the message "Internet Explorer cannot display the webpage". If i take out the layout obj creation code then the page loads fine (of course it doesn't work as intended becasue there is no layout object):


<div id="_manageCustomerPage_layoutA" style="position: relative; width: 575px; height: 300px;"></div>
        <script>
            var dhxLayout__manageCustomerPage_layoutA = new dhtmlXLayoutObject("_manageCustomerPage_layoutA", "3L", "dhx_blue");
            dhxLayout__manageCustomerPage_layoutA.setImagePath("../Images/htmlx");
        </script>

Answer posted by Support on Feb 04, 2009 02:48
Hello,

Please try something like this:

<body onload="doOnLoad();">
    <div id="_manageCustomerPage_layoutA" style="position: relative; width: 575px; height: 300px;"></div>

       <script>
            var dhxLayout__manageCustomerPage_layoutA;
            function doOnLoad() {
                dhxLayout__manageCustomerPage_layoutA = new dhtmlXLayoutObject("_manageCustomerPage_layoutA", "3L", "dhx_blue");
                dhxLayout__manageCustomerPage_layoutA.setImagePath("../Images/htmlx");
            }
        </script>
Answer posted by Mike H on Feb 04, 2009 06:55

Hi,

I was able to ge the page to load in IE by doing that. Unfortunately do to the ordering, the layout object was being created AFTER the content was being added to the layout. So, i am now trying to call a sequence of javascript functions to first create the layout, then add each content area in turn. The first time i try to attach content to the layout in load_manageCustomerPage_layoutA_cella(){, it calls the alert, then does nothing else, and none of the other functionas are called. I have attatched the complete HTML file and higlhlighed the relevant javascript below.

 

<script>
  var bodyLoadFunctions = [];
  function doOnLoad(){
   for (var i = 0; i < bodyLoadFunctions.length; i++){
    var nextFuncCall= bodyLoadFunctions[i];
    alert('Function found with type: ' +  typeof(nextFuncCall));
    nextFuncCall();
   }
  }
 </script>  

<script>
   function load_manageCustomerPage_layoutA(){
    var dhxLayout__manageCustomerPage_layoutA = new dhtmlXLayoutObject("_manageCustomerPage_layoutA", "3L", "dhx_blue");
    dhxLayout__manageCustomerPage_layoutA.setImagePath("../Images/dhtmlx");
   };
            bodyLoadFunctions.push(load_manageCustomerPage_layoutA);
  </script>

  <script>
            function load_manageCustomerPage_layoutA_cella(){
                alert('inside load_manageCustomerPage_layoutA_cella()');
       dhxLayout__manageCustomerPage_layoutA.cells("a").attachObject("_manageCustomerPage_layoutA_a");
       dhxLayout__manageCustomerPage_layoutA.cells("a").setWidth(300);
   };
            bodyLoadFunctions.push(load_manageCustomerPage_layoutA_cella);
  </script>

  <script>
            function load_manageCustomerPage_layoutA_cellb(){
                alert('inside load_manageCustomerPage_layoutA_cellb()');
       dhxLayout__manageCustomerPage_layoutA.cells("b").attachObject("_manageCustomerPage_layoutA_b");
   };
            bodyLoadFunctions.push(load_manageCustomerPage_layoutA_cellb);
  </script>

  <script>
            function load_manageCustomerPage_layoutA_cellc(){
                alert('inside load_manageCustomerPage_layoutA_cellc()');
       dhxLayout__manageCustomerPage_layoutA.cells("c").attachObject("_manageCustomerPage_layoutA_c");
   };
            bodyLoadFunctions.push(load_manageCustomerPage_layoutA_cellc);
  </script>

 

Attachments (1)