WordPress.org

Ready to get started?Download WordPress

Forums

Onclick problem with embedded Google Map (4 posts)

  1. Dave333
    Member
    Posted 5 years ago #

    My problem concerns the use of Google Maps. I embedded a map in one of my pages and added a link below the map that reloads the map to show another location so the visitor can see other locations on the same embedded map. I am using the following code (I have cut the Google Map address to simplify the example):

    <iframe id="MapLocal" width="500" height="412" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps...."</iframe><a href="#">Link to new Location</a>

    I have not had any problems for the past year and it worked really well. But now all of a sudden it won't work. I have tried disabling my plug ins one by one and none of them seem to be responsible for breaking the functionality.

    If I simply copy and paste the same code into a HTML page it works fine indicating it is WordPress that all of a sudden has a problem. I can't think if anything I changed recently that might have effected this other than install a Google Site Map plugin. But I tried disabling that anyway and the problem remained.

    Can any one offer a possible solution or reason why this broke all of a sudden?

  2. Dave333
    Member
    Posted 5 years ago #

    I can't get the code to display in this forum, it keeps getting stripped out. I'll try again in a comment to see if it sticks.

    <iframe id="MapOfArea" width="500" height="412" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps...output=embed"></iframe><a href="#" onclick="document.getElementById('MapOfArea').src='http://maps.google.com/maps...output=embed'">New Location</a>

  3. Dave333
    Member
    Posted 5 years ago #

    Anyone?

  4. pmcasey
    Member
    Posted 5 years ago #

    I had the same thing happen. After migrating to a new host, which involved moving my database, I lost the ability to embed Google Maps via iframes as an admin on the site. Anyone know what database settings may have change to prevent this?

Topic Closed

This topic has been closed to new replies.

About this Topic