ajax:
$.ajax({
type: "POST",
url: "calculator/panouri-simple/calcul-panouri-simple.php",
data: $("#formular_comanda").serialize(),
success: function(result)
{
document.getElementById("show_panels").innerHTML = result;
},
error: function(result)
{
console.log("Eroare:");
console.log(result);
}
});
HTML:
<div id="show_panels"></div>
when I look into "View page source" on browser, there is no html code between <div id="show_panels"> and </div>.
result from ajax is returning some inputs and I call those inputs with another ajax, but in html page source, those inputs are not there.
They are visually in browser, but the html code is not present in source code. I hope you understand what do I mean here. Look at the photos.
I am calling those inputs names in a php file and I get undefined variabile .... This is my problem. Visually, the inputs are there but no html code.
Debugger:



resultis anything other thanundefined? What is it?show_panelssucces ... resultandresult ="the html code I need";