...

View Full Version : Jacascript searching google map



leegodden
06-17-2010, 08:36 AM
Hi

I have the following JavaScript search text box on my Google map page:
which searches for locations on the map:


<input type="text" id="postcode" size="28" />&nbsp;
<input style="height:23px" type="submit" class="button" value="center
map"
onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value,
placeMarkerAtPoint)" />


Is it possible to adapt this code so it can be put on a separate page,
so the user can search my map?

Any help will be much appreciated
Thanks in advance

Rifki

Philip M
06-17-2010, 11:10 AM
Is it possible to adapt this code so it can be put on a separate page,
so the user can search my map?


No.

For security reasons JavaScript cannot access anything beyond the domain of the current page. This is known as the "same origin policy" and prevents a document or script loaded from one origin from getting or setting properties of a document from a different origin.


Quizmaster: In biology, what "v" is the act of performing experiments on living animals?
Contestant: Vasectomy.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum