Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/06/2009, 18:47
andresito12_19
 
Fecha de Ingreso: noviembre-2008
Mensajes: 80
Antigüedad: 15 años, 5 meses
Puntos: 1
problema con textarea

hola a todos tengo el siguiente formulario
Código PHP:
<form name="form1" id="form1" method="post" action="javascript:enviarFormulario('../dao/php_actividad/nuevo.php','form1');" >
<br>
<div style="background-image: url(../Imagenes/fondito4.png); background-position:center top; background-repeat:no-repeat;">
<br><br>
  <table>
    <caption align="top">
      <span class="Estilo4"><img src="../Imagenes/nueva_act.png" width="350" height="60" border="0"></span>
    </caption>
    <tr>
      <th align="right">Codigo</th>
      <td align="left"><input name="cod_act" type="text" value="<?php echo "".$_POST['cod_act']; ?>" onKeyPress="return acceptNum(event)"></td>
    </tr>
    <tr>
      <th align="right">Actividad</th>
      <td align="left"><textarea name="detalle_act" rows="5" cols="20" value="<?php echo"".$_POST['detalle_act'];?>"></textarea></td>
    </tr>
    </tr>
      <tr>
      <th align="right">Fecha de la actividad(dd/mm/aaaa)</th>
      <td align="left"><input name="fec_act" type="text" value="<?php echo"".$_POST['fec_act'];?>" onblur="valFecha(this)"></td>
    </tr>
     <tr>
     <th align="right">Encargado de la actividad</th>
     <td align="left"><select name="enc_act">
 <option  value="<?php echo "".$_POST['en_act']; ?>" selected="selected"><?php echo "".$_POST['doc_mat']; ?></option>
    <?php
     $mat
=new ConsultasDAO();
     
$con=$mat->db->consulta("*",'docente',"","");
     
$num=pg_num_rows $con );
     if (
$num>0) {
     while(
$fila=pg_fetch_array($mat->db->consulta)){
               
?>
      <option value="<?php echo"".$fila["nombre_doc"];?>"><?php echo"".$fila["nombre_doc"];?></option>
  <?php }} ?>
  <?php
     $mat
=new ConsultasDAO();
     
$con=$mat->db->consulta("*",'administrador',"","");
     
$num=pg_num_rows $con );
     if (
$num>0) {
     while(
$fila=pg_fetch_array($mat->db->consulta)){
               
?>
      <option value="<?php echo"".$fila["nombre_adm"];?>"><?php echo"".$fila["nombre_adm"];?></option>
  <?php }} ?>
  </select>
    </td></tr>
    <tr>
     <th align="right">Año lectivo de la actividad</th>
     <td align="left"><select name="ano_act">
 <option  value="<?php echo "".$_POST['ano_act']; ?>" selected="selected"><?php echo "".$_POST['ano_act']; ?></option>
    <?php
     $mat
=new ConsultasDAO();
     
$con=$mat->db->consulta("*",'ano_lectivo',"","");
     
$num=pg_num_rows $con );
     if (
$num>0) {
     while(
$fila=pg_fetch_array($mat->db->consulta)){
               
?>
      <option value="<?php echo"".$fila["id_ano_lectivo"];?>"><?php echo"".$fila["ano_lectivo"];?></option>
  <?php }} ?>
  </select>
    </td></tr>
  <tr>
      <th colspan="2" scope="row">
       </th>
    </tr>
  </table>
  <br>
  </div>
</form>
mi problema surge con el campo textarea si ingreso una informacion en dicho campo no se guarda en la base de datos y lo que es mas si ingreso la informacion en la base de datos cuando la quiero ver en la pagina tampoco muestra la informacion del campo de textarea

como utilizo div en lugar de iframe uso esta funcion para traer los datos al div contenedor
Código PHP:
function enviarFormulario(urlformid){
    var  
peticion false
if (window.XMLHttpRequest) {// Si es Mozilla, Safari etc
 
peticion = new XMLHttpRequest()
} else if (
window.ActiveXObject){ // pero si es IE
try {
 
peticion = new ActiveXObject("Msxml2.XMLHTTP")

catch (
e){ // en caso que sea una versión antigua
try{
 
peticion = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (
e){}
}
}
         var 
Formulario document.getElementById(formid);
         var 
cadenaFormulario "";
         var 
sepCampos;
         
sepCampos "";
         for (var 
i=0<= Formulario.elements.length-1;i++) {
         if(
Formulario.elements[i].type=='radio'){
          if(
Formulario.elements[i].checked){
         
cadenaFormulario += sepCampos+Formulario.elements[i].name+'='+encodeURI(Formulario.elements[i].value);
         
sepCampos="&";}
         }
         else{
          
cadenaFormulario += sepCampos+Formulario.elements[i].name+'='+encodeURI(Formulario.elements[i].value);
         
sepCampos="&";
         }
}
  
peticion.open("POST"urltrue);
  
peticion.setRequestHeader('Content-Type''application/x-www-form-urlencoded; charset=ISO-8859-1');
  
peticion.onreadystatechange = function () {
  if (
peticion.readyState == && (peticion.status == 200 || window.location.href.indexOf ("http") == - 1)){
                
document.getElementById('contenedor').innerHTML peticion.responseText;
          } 
}
peticion.send(cadenaFormulario);

lo digo por que al parecer esto e¡nfluye en la tramite de los formulario
de antemano agradezco enormemente su ayuda