Google map failing to display in PHP

lucubrb

New Member
I am using php to develop a application which uses Google maps. The problem i have is when i go from one page to another the Google map does not display but when i manually type in the php web address the map displays successfully. E.g. Select car... Submit.. Map does not display but typing the exact same web address in manually will display the map.I have inputted the body style, function and scripts. Functions used for maps\[code\]<script> try { $(function() { }); } catch (error) { console.error("Your javascript has an error: " + error); } function initialize() { var mapDiv = document.getElementById('map-canvas'); var map = new google.maps.Map(mapDiv, { center: new google.maps.LatLng(37.4419, -122.1419), zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP }); } google.maps.event.addDomListener(window, 'load', initialize); function detectBrowser() { var useragent = navigator.userAgent; var mapdiv = document.getElementById("map-canvas"); if (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1 ) { mapdiv.style.width = '100%'; mapdiv.style.height = '100%'; } else { mapdiv.style.width = '600px'; mapdiv.style.height = '800px'; }} </script>\[/code\]Any ideas? Emma
 
Top