PROBLEMS WHEN USING INNERHTML JS

0

Good morning, I have not been able to upload a project since it marks me an error in the innerHTML

.php

var cell0= row.insertCell(0);
                             var folio = data['datos_tabla'][index]['descripcion'];

                            cell0.innerHTML ='<td bgcolor="blue" align="center"><a href="#" title="Elegir concepto" onclick="javascript:return conceptos_erp()" >'+folio+'</a></td>';

And in the JS according to I have everything right I hope you help me here I leave you the

: JS

function conceptos_erp()
{
    document.getElementById("ayuda").innerHTML="";
    var det=$("#ayuda").dialog({modal: true});
    det.html('<div align="center">Cargando Datos ...<images src="img/loading.gif"/></div>');
    det.dialog({position: "top"});
    det.load("conceptos_erp.php");
    det.dialog(
    {
        title:'Catalogo de Conceptos',
        buttons:{
                        "Cerrar": function()
                        {
                            //$(this).dialog("close");
                            det.dialog('close');
                            $("#mail").focus();
                        }
                 },
        width:530,
        height:400
    });
    det.dialog('open');

}

ERROR:

I hope you can help me and guide, greetings

    
asked by 30.05.2018 в 19:41
source

1 answer

0

to see the error you must put the pointer over the red circle with the X, if you get the following error means that in the DOM there is no element with that ID

which is what you are looking for when executing:

document.getElementById("ayuda")

That's why you should select an existing ID.

I hope this helps you solve the problem!

    
answered by 23.11.2018 в 05:28