Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2009
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jacascript searching google map

    Hi

    I have the following JavaScript search text box on my Google map page:
    which searches for locations on the map:
    Code:
    <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

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,145
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    Quote Originally Posted by leegodden View Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •