0

Hi! Is it possible to refresh only a <script> and not all the page?!

i have a <script> that displays google maps... and i show it on my page with other material..

i just wanted to refresh that script (google maps display), and not all the page...

i did it a refresh.. but it makes of all page..

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=x"
            type="text/javascript"></script>
  <script type="text/javascript">

	function load() {
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			
			map.setCenter(new GLatLng(<? echo "$x,$y"; ?>), <?=$zoom?>);
			
			map.addControl(new GSmallMapControl());

			var point = new GPoint (<? echo "$y,$x"; ?>);
			var marker = new GMarker(point);
			map.addOverlay(marker);
			map.setUIToDefault();
		}
	}
</script>
<meta http-equiv="refresh" content="10" />

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style><body onLoad="load()" onUnload="GUnload()">
3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by Will Gresham
0

can u give me example? what code should i do?

sorry.. if you can please

0

oh but that i have to click on it..

i want an automatic refresh... like i did (my code it refresh the pages 10 in 10 secs)

i want is to refresh only the google map, and not all the page.. but i want it automatically...


if someone could help.. i would appreciate..

thanks a lot!

1
function mapRefresh(timeoutPeriod) {
	setTimeout(load(),timeoutPeriod);
}

Then add mapRefresh(10000) to the Onload event.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.