I'm having an issue which I have found, but do not understand.

1. I am using Google API map, which is the "Find a Location" function provided by Google for developers. It uses AJAX and reads latitude/longitude data from an SQL database table which you set up.

2. I am placing this within a Magento template for a client.

The AJAX works perfectly, but when I go to search a zip code, it shows no results (not reading from the SQL). Checked every page of code twice, it's all good.

The weird thing is, when I make the map a separate html file and then reference it with an <iframe> in the CMS, it works perfectly...

...which leads me to believe the file permissions are not allowing the map to access the SQL database when it is inside the "page" folder (Magento's folder for front page files.

Am I on the right track? Thank you so much in advance.