-1
I have a "Y.php" file that returns in one of the inputs, the resulting calculation of other inputs within this same file, I do this using Jquery and is working 100%.
However, I would like to use the result of this calculation that is stored in the variable "X" in another input contained in the file "Z.php". That is, I want to use the value of this input (contained in "Z.php") as a result of another input contained in the file "Y.php".
How do I do this with Javascript?
require ('apNaoCirculantes.php'); //arquivo onde está a input na qual desejo pegar o valor
var totaldeparred; // é o variável da input
var campo16; // já estou no arquivo Z.PHP
campo16 === totaldeparred;
$("#depreciacao1").maskMoney('mask', totaldeparred); //minha input #depreciacao1 recebe o valor contido em totaldeparred
That’s it?
Can you do this via include or Ajax? Your question has gotten kind of distant.
– Sam
Whatever, I can test the simplest solution?
– Bruce Duarte
So the easiest way is to make a include. So the input with the value you want to pick up will be on the same page and can catch this result with JS.
– Sam
You can cite an example of this include?
– Bruce Duarte
require('pagina.php');
– Sam
From what I understand, you want to open the Z.php page and take the value contained in an input of the Y.php page, that’s it?
– Sam
yes, I want the input value that is in Y.php and put it in the input contained in Z.php.
– Bruce Duarte
This I understood. But the page you want to open is Z.php?
– Sam
Yes, exactly.
– Bruce Duarte
I will elaborate an answer with the concept of this, since there is no exact code, then you test.
– Sam