0
I have a question regarding my project. I have a button in a page "x" that when 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 in a page "y" with the same scheme: button; when clicked catch the value of two input fields and then mark on the map. Only that the map is in the page "x" and the button on page "y" and the script on the map in "script.js".
I can’t think of any way to do that, because I don’t have very much knowledge. I saw that the possibilities in an AJAX of life would be right, but I do not have much knowledge.
I’d like your help with that doubt, if there’s a way to do it and an example of how to do it.
Briefly, it would be: run button on page y -> the function is read from a Function in the script file. js where is the map and the functions -> then performs this function on page x and marks on google maps api the location.
This page is where. Explain more about where the pages are.
– Atila Silva
So you have index.php where the map is loaded (coming from . js) the inputs and the find button. When you fill in the inputs and press "find" google maps positions a marker in the api according to the input values. So far, okay, just that I need to do this on the.php equipments page where I refer the same file. js with the same button and even referencing, it does not receive Function values, let alone mark in index.php the location.
– brnTwp
I put images to improve understanding.
– brnTwp
Well. Changing information between pages is somewhat complicated. But it’s possible. I just haven’t seen myself doing it. An average solution to this problem would be to render this crud in a modal and not in a Poup-up. With the modal you will be in the same document can change any action or variable with javascript.
– Atila Silva
I understood, the problem is that I only left popup because the map contains bookmarks with js de window.open based on the information in the database.. It would have to be really popup and try to find a way for two pages to exchange information
– brnTwp