I have a question regarding my project. I have a button on an "x" page that upon clicking it checks the geolocation in Google maps (fills the inputs with the coordinates). So far so good, I need to do this function also on a page and y with the same schema: button; on click I get the value of two input fields and then mark on the map. But the map is on the "x" page and the page and " button and the script on the map in" script.js ".
I can not think of any way to do this, because I do not have very great knowledge. I saw that the possibilities in an AJAX of life would work, but I do not have much knowledge.
I wanted your help with this question, if there is a way to do it, and an example of how to do it.
In short, it would be: run button on page and -> the function is read from a function in the script file. where is the map and the functions - > then run this function on page x and mark in google maps after location.