4
Is there any script that sends my input value to the page input I open ?
As the example below shows, I need to send the value "12345" to the input of the XYZ page as soon as I click the link to open it, to expedite the search by code.
My website:
<div>
<a href="www.paginaxyz.com.br">Consultar</a>
<input id="CodigoConsulta" type="hidden" value="12345" />
</div>
Page XYZ:
<div>
<label>Código: </label>
<input id="Codigo" type="text" value="" <--receber-- "12345" />
<button id="btnPesquisar" type="button">Pesquisar</button>
</div>
I tried to search for something in . js and jquery, but I can’t run the scripts because I don’t have the "context" of the other page
The script I thought would look something like this:
<script>
var url = www.paginaxyz.com.br;
$(document, url).ready(function(){
$("#Codigo").val($("#CodigoConsulta").val());
});
</script>
It is possible to carry out this process ?
Edit: * The landing page is from another company, as if I were going to do an Nfe query by access key, for example *
wants to do in client?
– N. Dias
Why don’t you make a
post
to the other page ?– Pedro Augusto
You have already tried to pass as the GET parameter of the XYZ page?
– N. Dias
In my case, the landing page is not mine, and I don’t know the route/name of the parameter that it expects for the query ... I tried to pass via get, but it didn’t work ..
– gabriellima
Inspect the page, see which method its form uses. Do the same in your system.
– Pedro Augusto