Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/04/2008, 02:03
Avatar de ZiTAL
ZiTAL
 
Fecha de Ingreso: marzo-2004
Ubicación: Bermio (Bizkaia)
Mensajes: 1.545
Antigüedad: 20 años, 2 meses
Puntos: 62
Re: document.forms.form0.accio has no properties ??

lo mejor sera que lo hagas por ID y no por nombre, agregale una ID a los formularios:

Código PHP:
echo "<form action=\"modnot.php\" method=\"post\" id=\"form".$i."\">
      <input type=\"hidden\" name=\"accio\" id=\"accio"
.$i."\" value=\"\">"
y en vez de poner este churro:
Código HTML:
<img src="../imatges/del.png" onClick="document.forms.form<?php echo $i;?>.accio.value=1;document.forms.form<?php echo $i;?>.submit()">
            <img src="../imatges/edit.png" onClick="document.forms.form<?php echo $i;?>.accio.value=0;document.forms.form<?php echo $i;?>.submit()"> 
Código:
<script type="text/javascript">
 function envia(id,accion)
  {
    switch(accion)
     {
       case 'edit':
         document.getElementById('accio'+id).value=0;
         document.getElementById('form'+id).submit();
         break;
       case 'del':
         document.getElementById('accio'+id).value=1;
         document.getElementById('form'+id).submit();
         break;
     }
  }
</script>
Código HTML:
<img src="../imatges/del.png" alt="eliminar" onclick="envia('<?php echo $i; ?>','del')" />
<img src="../imatges/edit.png" alt="editar" onclick="envia('<?php echo $i; ?>','edit')" /> 
ya que el form no tiene nombre ;)
__________________
http://zital.no-ip.org
____________________

Euskerie ahuen eta bijotzan