Problem with method replaceNode in IE, please help

View: New views
1 Messages — Rating Filter:   Alert me  

Problem with method replaceNode in IE, please help

by Rafael Avaria G :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

$response->replaceNode('main', 'table', array('innerHTML' =>
$tpl->fetch("screen.tpl"), 'id' => 'main'));
this method work fine in firefox but in IE 6 give an unkown error at
compile time -2146827688, when innerHTML have a big HTML source, see attach.

this is the complete source:

public function drawHtml($param = '%'){

  $tpl = new MecTr_Smarty();
  $response = new HTML_AJAX_Action();
  $lista = $this->listUser($param); // this method is a SQL call
  if ( is_array($lista)  ){
      $action = Array( "edit" => true,
                       "delete" => true,
                       "activar" => true,
                       "reglas" => false );

      $tpl->assign('action',$action);
      $tpl->assign('lista',$lista);
      $tpl->assign('user',true);

     // $response->insertAlert($tpl->fetch("screen.tpl")); // debug,
work fine in IE and Firefox
      $response->replaceNode('main', 'table', array('innerHTML' =>
$tpl->fetch("screen.tpl"), 'id' => 'main')); // fail in IE 6
  }else{
    $response->insertAlert('No se ha podido ejecutar esta accion'); //
work fine in Firefox and IE
  }
  return $response;
}// fin funcion drawHtml

here is screen.tpl.

 {literal}
  <script type="text/javascript">
     function wsubjet (ele,str){
      ele.subjet = str;
      getRemoteClass(ele);
     }
  </script>
  {/literal}

  <table id="main">

    {* Seccion de listar elementos *}
    {foreach key=llave  item=elemento  from=$lista  name=list}
     <tr>
       {if $action.edit eq "true"}
          <td style="width:50px;">
            <a href=""><img src="images/edit.gif" alt="Editar"/></a>
          </td>
       {/if}
        <td  style="width:auto;text-align:left;">
          {if $user eq "true" }
          <form name="form{$smarty.foreach.list.iteration}"
                id="userform{$smarty.foreach.list.iteration}" >
             <input name="idUser" type="hidden" value="{$elemento[0]}" >
             <input name="subjet" type="hidden" value="" >
          <span>Nombre de Usuario: {$elemento[1]}</span>
           </form>
          {/if}
        </td>
        {if $action.delete eq "true"}
        <td style="width:50px;">
            <a
href="javascript:wsubjet(document.form{$smarty.foreach.list.iteration},'Borrar')">
              <img src="images/delete.gif" alt="Borrar"/></a>
          </td>
       {/if}

       {if $action.activar eq "true"}
          <td style="width:50px;">
            <a
href="javascript:wsubjet(document.form{$smarty.foreach.list.iteration},'Activar')"
 >
                <img src="images/active.gif" alt="Activar"/>
            </a>
          </td>
       {/if}





_______________________________________________
Html_ajax-devel mailing list
Html_ajax-devel@...
http://lists.bluga.net/mailman/listinfo/html_ajax-devel

Dibujo.GIF (9K) Download Attachment