I need that when I press the "Generate" button, I load a link in the "Certificate" div.
<div class="container-fluid">
<div class="side-body">
<h1 class="titleh">Generar Certificado</h1>
<div style="width: 40%;">
<form action="#">
<div class="form-group">
<label for="dirigido">Dirigido a:</label>
<input type="text" class="form-control" name="dirigido" id="dirigido" placeholder="Ingrese un valor">
</div>
<div class="form-group">
<label for="cc">Cedula:</label>
<input type="password" class="form-control" name="cc" id="cc" placeholder="Ingrese Cedula">
</div>
<input type="submit" value="Generar" name="Generar" class="btn btn-sm" style="color: white; background: #006050;">
</form>
</div>
<br><br><br>
<div class="container" style="width: 100%; height: 490px; background-color: #A7A7A7"></div>
</div>
</div>
From what you say in the question and in the comments, the URL to consult is generated by means of the ID (cc) based on any URL that, I suppose for security reasons, cannot be shown here.
Knowing this, all you have to do is make an AJAX request to that URL to download the HTML:
If that request returns dynamic content, it's better to use an
object
oriframe
to load that URL directly into the document. For example:HTML
javascript
In that case, you just download the HTML on the server instead of the client:
And the AJAX request must be made to this file.
Or embedded:
First I would modify a few things to your form
action="#"
solo to avoid refreshing the page when sending theform
.input
to abutton
and remove the typesubmit
since we are not going to refresh the page or refresh it.I would do the
submit
com functionclick
with jQueryCreate an 'Onclick' function and fill in the record you need or create a JQuery function that checks when it's a submit event then performs the function you need
Using the function
.load()
you will be able to load what is on another page and put it where you want