Foros del Web » Programando para Internet » Javascript »

simplemente no funciona.

Estas en el tema de simplemente no funciona. en el foro de Javascript en Foros del Web. Hola con esta función agrego una tabla en la cual tiene 2 imput type radio 1 imput type text y uno type file, un botón ...
  #1 (permalink)  
Antiguo 19/10/2010, 13:28
 
Fecha de Ingreso: noviembre-2007
Mensajes: 66
Antigüedad: 16 años, 5 meses
Puntos: 0
Exclamación simplemente no funciona.

Hola con esta función agrego una tabla en la cual tiene 2 imput type radio 1 imput type text y uno type file, un botón grabar y un botón cancelar todo bien, pero al momento de apretar el botón guardar no pasa nada alguna idea, gracias

Código PHP:

function agregarGaleria(celda,aff_id ){
        
    
    
tabla celda.parentNode.parentNode;
    
pos celda.parentNode.parentNode.rows.length;    
    var 
newRow tabla.insertRowpos );
    
    var 
newCellA newRow.insertCell(0);
    var 
newCellB newRow.insertCell(1);
    var 
newCellC newRow.insertCell(2);
    
    
newCellA.id "Texto"+pos;
    
newCellB.id "Seleccion"+pos;
    
newCellC.id "Boton"+pos;    
    
    
    
cajaSi         document.createElement("INPUT");
    
cajaSi.setAttribute('type','radio');
    
cajaSi.setAttribute('value','1');
    
cajaSi.id     "ima_ind_ppal";
    
cajaSi.name    "ima_ind_ppal";
    
cajaSi.onclick = function (){
        
cajaSi.checked=true;    
        
cajaNo.checked=false;    
    }
    
cajaNo         document.createElement("INPUT");
    
cajaNo.setAttribute('type','radio');
    
cajaNo.setAttribute('value','0');
    
cajaNo.onclick = function (){        
        
cajaNo.checked=true;    
        
cajaSi.checked=false;    
    }
    
cajaNo.id     "ima_ind_ppal";
    
cajaNo.name    "ima_ind_ppal";

    
cajaDes     document.createElement("INPUT");
    
cajaDes.setAttribute('type','text');
    
cajaDes.id     "ima_descripcion";
    
cajaDes.name"ima_descripcion";
    
    
file     document.createElement("INPUT");
    
file.setAttribute('type','file');
    
file.setAttribute('class','required');    
    
file.id     "ima_link";
    
file.name     "ima_link";
    
    
cancel =  document.createElement('BUTTON');
    
cancel.className="boton";
    
cancel.appendChilddocument.createTextNode"Cancelar" ) );
    
cancel.onclick = function(){
        
tabla.deleteRow(pos--);    
        
ocultar('boton');
        return 
false;
    }
        
    
botonG document.createElement'BUTTON' );
    
botonG.className="boton";
    
botonG.appendChilddocument.createTextNode"Grabar" ) );
        
    
    
botonG.onclick= function()
    {        
        
uri  "guardarDatos.php";
        
uri += "?ACTION=GRABAR_GALERIA";
        
uri += "&ima_ind_ppal="+ima_ind_ppal.value;
        
uri += "&ima_descripcion="+ima_descripcion.value;
        
uri += "&ima_link="+ima_link.value;        
        
ajax=objAjax();
        
ajax.open("GET"uritrue);
        
ajax.onreadystatechange=function(){
            if (
ajax.readyState==4){
                var 
cadena ajax.responseText.split("@@");            
                
document.getElementById(newCellB.id).innerHTML=trim(cadena[1]);
            }
        }
    
ajax.send(null);
        
        return 
false// <-- PARA QUE NO SE ACTUALIZE LA PÁGINA.
    
}    
    
        
    
newCellA.appendChild(document.createTextNode("Si"));
    
newCellA.appendChildcajaSi );
    
newCellA.appendChild(document.createTextNode("No"));
    
    
newCellA.appendChildcajaNo );
    
newCellB.appendChildcajaDes );    
    
newCellC.appendChildfile );        
    
newCellC.appendChildcancel );    
    
newCellC.appendChild(document.createTextNode(" "));
    
newCellC.appendChildbotonG );    
    
    return 
false// <-- PARA QUE NO SE ACTUALIZE LA PÁGINA.


Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:46.