0
**I have a page where I upload all the pages inside one <div content>
:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<script>
var vars = geturlvar()['Nome'];
$(function () {
$("#includedContent").load(vars);
});
</script>
<script>
function CarregaCamposModulo() {
debugger;
var id = localStorage.id;
var nome = localStorage.nome;
document.getElementById("id_id").value = id;
document.getElementById("id_nome").value = nome;
};
</script>
</head>
<body class="theme-red" onload="CarregaModulos();CarregaCamposModulo()">
<section class="content">
<img src="../images/carregando.gif" id="image">
<div id="includedContent"></div>
</section>
</body>
</html>
**And the page I carry inside the includedContent
by the link http://localhost/i9maker/pages/container_admin.html?Nome=consultas/admin_modulo.html
**
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Módulos</title>
</head>
<body>
<div class="container-fluid" style="margin-left: -29px; margin-right: -29px">
<!--Striped Rows-->
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card-panel" style="margin-top: -29px; ">
<div class="card" style="background: rgba(245, 245, 245, 0.6)">
<div class="body">
<form class="form" id="wizard_with_validation" method="POST">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<input id="id_id" name="id_id" type="hidden" class="form-control input-style" autofocus required>
<label class="label-margin-top">Descrição*</label>
<input id="id_nome" name="id_nome" type="text" class="form-control input-style input-casesensitive" autofocus required>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
It is working in Google Chrome, but in Firefox and Edge, does not work, error if at the time of:
Document.getElementById("id_id"). value = id;
Document.getElementById("id_name"). value = Description;
Debugging in Edge error appears:
Unable to set Property 'value' of Undefined or null Reference
Image in firefox, works only in debug mode, running without debug mode brings nothing.
Google Chrome, this is Google Chrome:
console log.(
localStorage.id
) gives what result?– Marconi
@Marconi the result is 1
– Gleyson Silva
I made a Fiddle I could not play the problem at least in Firefox.
– Marconi
@Marconi edited the question and added more details of how I am doing, there are some more details that I did not think would not matter, because I’m making a include of this page in another.
– Gleyson Silva