View Full Version : Ajaxtab is not displaying external page which contains google map

08-17-2007, 12:16 AM
1) Script Title:
Ajax Tabs Content

2) Script URL (on DD):

3) Describe problem:

Hi All,

I am new to AJAX so please help me out here. I am using DD Ajaxtab in above link and trying to add an external page on one of the page which contains google map using google API. Code of that external page is displayed below. How can I make it work. All other tab content works fine except this one.:confused: Please Help and THANKS in advance.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example</title>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=[mykey which I have removed];
<script type="text/javascript">
function load() {
if (GBrowserIsCompatible()) {

//take last ll attributes from link to this page url of the map
var map = new GMap2(document.getElementById("map").href="greenacres_maps.html");
map.setCenter(new GLatLng(40.268791,-74.876836), 14);
map.addOverlay(new GMarker(new GLatLng(40.268791,-74.876836)));

<body onload="load()" onunload="GUnload()">
<table width=500 border="1">
<tr><td width="500">
<div id="map" style="width: 500px; height: 300px"></div>


08-17-2007, 02:16 AM
Since Google Maps contains JavaScript that is rendered at run time, when fetched via Ajax, it will no longer work. What you can do is first create a blank HTML page (ie: externalpage.htm), then inside it, create a <iframe> tag that calls the actual Google Maps page: (ie: googlemap.htm). Something like:

<iframe src="googlemap.htm" style="margin:0; padding:0; width:100&#37;; height: 100%"></iframe>

Then inside the Ajax Tabs script, have one of the tabs call externalpage.htm.

08-17-2007, 03:29 AM
ddadmin...Thanks for the easy yet very good and elegent workaround. It is working great !!! :)

02-13-2008, 10:43 PM
Hey guys,

sorry to dig this back up, but i'm having some trouble that an iframe won't fix...

www.caseywight.com/orionsphoto/index.php is where i'm stuck

i'm using the dynamic ajax loading script to load from the flash header into the content div, and when a user goes from one page to another it works great! except... if you go from any of the pages, back to home - the flash doesn't show up :(

does ANYONE KNOW how i can create a force-load, or perhaps make this ajax script NOT check to see if it's loaded it before. I have no problem with it taking a little while longer for these pages to load up, if there is a way to remove the check-to-see-if-content-has-been-loaded part.

but i'm no ajax programmer

can i get some help??


02-14-2008, 07:52 AM
Sunshine, I don't see Ajax Tabs content running on that page actually.

02-14-2008, 06:31 PM
hot damn!

sorry guys, i realized i posted to the wrong thread, then i realized i could fix it without this ajax stuff :P

thanks anyway!