0
Welcome Guest! Login
0 items Join Now

Problems with body onload

  • Problems with body onload

    Posted 12 years 6 months ago
    • [SOLVED]
      Hi
      I have this code and i want to put into a joomla module but , when i inserted - get a blank page with no result on it
      <link rel="STYLESHEET" type="text/css" href="codebase/dhtmlxgrid.css">
      <script src="codebase/dhtmlxcommon.js"></script>
      <script src="codebase/dhtmlxgrid.js"></script>
      <script src="codebase/dhtmlxgridcell.js"></script>
      <script src="codebase/dhtmlxcombo.js"></script>
      <script src="codebase/ext/dhtmlxgrid_filter.js"></script>
      <script src="codebase/excells/dhtmlxgrid_excell_link.js"></script>

      <script>
      var mygrid;
      function doInitGrid(){
      mygrid = new dhtmlXGridObject('mygrid_container');
      mygrid.setImagePath("codebase/imgs/");
      mygrid.setHeader("Shape,Size,Color,Clarity,Certificat,Finisaj,Fluor,Certif-Link");
      mygrid.setInitWidths("*,100,*,*,100,*,*,100");
      mygrid.setColAlign("left,center,center,center,center,center,center,center")
      mygrid.setSkin("light");
      mygrid.setColSorting("str,int,str,str,str,str,str,str");
      mygrid.setColTypes("ed,ed,ed,ed,ed,ed,ed,link");
      mygrid.attachHeader('#select_filter,#numeric_filter,#select_filter,#select_filter,#select_filter,#select_filter,#select_filter,#rspan');
      mygrid.attachEvent("onRowSelect",doOnRowSelected);
      mygrid.init();
      mygrid.loadXML("step3.xml");
      }

      function addRow(){
      var newId = (new Date()).valueOf()
      mygrid.addRow(newId,"",mygrid.getRowsNum())
      mygrid.selectRow(mygrid.getRowIndex(newId),false,false,true);
      }
      function removeRow(){
      var selId = mygrid.getSelectedId()
      mygrid.deleteRow(selId);
      }

      function doOnRowSelected(rowID,celInd){
      alert("Selected row ID is "+rowID+"\nUser clicked cell with index "+celInd);
      }

      </script>

      <body.onload="doInitGrid()">
      <div id="mygrid_container" style="width:600px;height:150px;"></div>
      <button onclick="addRow()">Add Row</button>
      <button onclick="removeRow()">Remove Row</button>


      This image is hidden for guests.
      Please log in or register to see it.

      I think is a body onload problem but i can not get this out to work. The Joomla module what i use is mod_flexi_customcode.
      can you help me please to resolve the body onload problem.
      Thanks,
      Alex
      body onload replacement
      <script type="text/javascript">
      if(window.addEventListener){
      window.addEventListener('load', your function name, false);
      }
      else {
      if(window.attachEvent){
      window.attachEvent('onload',your function name);
      }
      }
      function your function name here() { your function code here};
      </script>
      Alex
    • Last Edit: 12 years 6 months ago by ALEXANDRU KISS.
    • Who?'s Avatar
    • Who?
    • Preeminent Rocketeer
    • Posts: 25562
    • Thanks: 613
    • Joomla freelancer

    Re: Problems with body onload

    Posted 12 years 6 months ago
    • I truly believe that you have to find your answers with mod_flexi_customcode support 8)
    • Check my services at: Mihha-Vision
  • Re: Problems with body onload

    Posted 12 years 6 months ago
    • Thnaks Igor , i will chek with mod_flexi_customcode support :mrgreen:
    • Who?'s Avatar
    • Who?
    • Preeminent Rocketeer
    • Posts: 25562
    • Thanks: 613
    • Joomla freelancer

    Re: Problems with body onload

    Posted 12 years 6 months ago
    • You're welcome! :D

      If this resolves your problem, please EDIT your FIRST POST in this thread by adding [SOLVED] at the start of the title and then select the GREEN TICK icon.

      This lets the moderators know that it can be moved to the solved section.
    • Check my services at: Mihha-Vision

Time to create page: 0.064 seconds