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 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with Internet Explorer

    Hi,


    I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error message as in alert box as


    " Internet Explorer cannot open the Internet site http://google.citycarrentals.com.au/...llocations.php . Operation aborted". It is working in Mozilla . Here i mentioned my code . I am facing this problem several days.Any body please help me .Its very Urgent.

    Code:
    <?
    error_reporting(5);
    session_start();
    include("conn.php");		
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 
    <head> 
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
    <title>Simple Google map</title> 
    <!-- //Change the following line to use your own key available from http://www.google.com/apis/maps/signup.html -->
    <script>
    function show1(){
    	//alert('hello');
    //document.getElementById("p1").style.display="none";
    }
    </script>
        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA6lo7chc3tJ4PtHEdUe07mhRyn6Gjw6raW1kj0ExjN4K0-gzleRQetwIWgwv6rUBDEdHLMjTZJO4mkg&amp;sensor=false" type="text/javascript">
    </script>
    <script>
    function open_win(url_add)
       {
       window.open(url_add,'welcome',
       'width=300,height=200,menubar=yes,status=yes,
       location=yes,toolbar=yes,scrollbars=yes');
       }
    
    function submitform(){
    //alert('hello');
    var answer = confirm ("Are you Sure Want to Delete the Vehicle?")
    if (answer)
    return true;
    else
    return false;
    }
    </script>
    <script type="text/javascript">
    var map;
    var geocoder = null;
    var icon0;
    var newpoints = new Array();
    var newpoints = new Array();
    var vpoints = new Array();
    var myarray=["icon2", "icon3", "icon4", "icon5", "icon6", "icon7"];
     
    		function addLoadEvent(func) { 
    			var oldonload = window.onload; 
    			if (typeof window.onload != 'function'){ 
    				window.onload = func
    			} else { 
    				window.onload = function() {
    					oldonload();
    					func();
    				}
    			}
    		}
     
    addLoadEvent(loadMap);
    addLoadEvent(addPoints);
    var lat=15;
    var lon=20;
    var g;
    function loadMap() {
    	map = new GMap2(document.getElementById("map"));
    	map.addControl(new GLargeMapControl());
    	map.addControl(new GMapTypeControl());
    	
    	map.setCenter(new GLatLng(-33.8673,151.2041), 13);
    	map.setMapType(G_NORMAL_MAP);
      
    	icon0 = new GIcon();
    	icon0.image = "images/home.png";
    	icon0.shadow = "images/shadow50.png";
    	icon0.iconSize = new GSize(32, 32);
    	icon0.shadowSize = new GSize(37, 34);
    	icon0.iconAnchor = new GPoint(9, 34);
    	icon0.infoWindowAnchor = new GPoint(9, 2);
    	icon0.infoShadowAnchor = new GPoint(18, 25);
    	var count=10;
    	var count1=15;
    	var some="";
    	var g=1;
    	var a='icon'+g;
    	//alert(a);
    	icon1=new GIcon();
    	icon1.image = "images/bmw-small.png";
    	icon1.shadow = "images/shadow50.png";
    	icon1.iconSize = new GSize(25, 25);
    	icon1.shadowSize = new GSize(20, 19);
    	icon1.iconAnchor = new GPoint(10, 15);
    	icon1.infoWindowAnchor = new GPoint(9, 2);
    	icon1.infoShadowAnchor = new GPoint(18, 25);
    	iconf1=new GIcon();
    	iconf1.image = "images/bmw-small1.png";
    	iconf1.shadow = "images/shadow50.png";
    	iconf1.iconSize = new GSize(25, 25);
    	iconf1.shadowSize = new GSize(20, 19);
    	iconf1.iconAnchor = new GPoint(10, 15);
    	iconf1.infoWindowAnchor = new GPoint(9, 2);
    	iconf1.infoShadowAnchor = new GPoint(18, 25);	
    	icons0 = new GIcon();
    	icons0.image = "images/GAPI/home.png";
    	icons0.shadow = "images/shadow50.png";
    	icons0.iconSize = new GSize(25, 25);
    	icons0.shadowSize = new GSize(37, 34);
    	icons0.iconAnchor = new GPoint(9, 34);
    	icons0.infoWindowAnchor = new GPoint(9, 2);
    	icons0.infoShadowAnchor = new GPoint(18, 25);
    	iconm1 = new GIcon();
    	iconm1.image = "images/merc-small1.png";
    	iconm1.shadow = "images/shadow50.png";
    	iconm1.iconSize = new GSize(12, 15);
    	iconm1.shadowSize = new GSize(20, 19);
    	iconm1.iconAnchor = new GPoint(10, 15);
    	iconm1.infoWindowAnchor = new GPoint(9, 2);
    	iconm1.infoShadowAnchor = new GPoint(18, 25);
    }
     
    	function addPoints() {
    	  var x=0;
    	  var y=0;
    		    <?
    		    $query=mysql_query("select * from offices");
    			while($row=mysql_fetch_array($query)){
    				$id=$row['offid'];
                ?>
    		    newpoints[x] = new Array('<?=$row['latitude']?>',  '<?=$row['longitude']?>', icon0, '<?=$row['office_name']?>', '<?=$row['description']?>'); 
    					<?
    						$query1=mysql_query("select * from vehicles where lid='$id'");
    						while($row1=mysql_fetch_array($query1)){
    					?>
    						   vpoints[y]=new Array('<?=$row['latitude']?>','<?=$row['longitude']?>','<?=$row['latitude']?>','<?=$row['longitude']?>','<?=$row['latitude']?>');
    						   y++;
    					 <?
    						}
    					 ?>
    			x++;
    		    <?
                }  
                ?>
    			 
    	 
    		for(var i = 0; i < newpoints.length; i++) {
    			var point = new GPoint(newpoints[i][1],newpoints[i][0]);
    			document.getElementById("lat1").value = newpoints[i][0];
                document.getElementById("lng1").value = newpoints[i][1];
    			var popuphtml = newpoints[i][4] ;
    			var marker = createMarker(point,newpoints[i][2],popuphtml);
    			map.addOverlay(marker);
    			var k=2;
    			var val='BMW';
    			var val1='Mercedes-Benz';
    			var val2='Mercedes';
    			<?
    			$query2=mysql_query("select * from vehicles");
    				while($row2=mysql_fetch_array($query2)){
    				$lat=$row2['latitude'];
    				$lon=$row2['longitude'];
    				$vehicletype=$row2['vmake'];
    				$val='BMW';
    				$reg=$row2['vehid'];
    				?>
    				document.getElementById('vid').value=<?=$row2['vehid']?>;
    				document.getElementById('location').value=<?=$row2['lid']?>;
                        if(newpoints[i][0]=='<?=$lat?>' && newpoints[i][1]=='<?=$lon?>' && val=='<?=$vehicletype?>')
    		               {
    						<?
                         $vid=$row2['vehid'];
    						$result3=mysql_query("select * from bookings where vid='$vid'");
    						$row3=mysql_fetch_array($result3);
    						?>
    						var popup ="";
    							popup +='<form name=\"form1\" method=\"post\" action=\"vehicleedit_act.php?id=<?=$reg?>\">';
    							popup +='<table>';
    							popup +='<tr><td><u>Vehicle Edit Form</u>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"viewalllocations.php?id=<?=$reg?>&vdel=yes\" onclick=\"return submitform();\">Delete</a></td><td>&nbsp;</td><td>&nbsp;</td><td><a href=\"javascript:void(0)\" onclick=window.open(\'expenses_edit.php?id=<?=$row2['vehid']?>\',\'mywindow\',\'width=600,height=500,scrollbars=yes,toolbar=yes,status=yes\')>Expenses Window</a></td></tr>';
    							popup +='</table>';
    							popup +='</form>';   
    							<?
    	$status=$row2['status'];
    	if($status=='visible'){
    	?>
    		var vmarker = cvmarker(point,eval('icon'+k),popup,<?=$row2['vehid']?>,<?=$row2['lid']?>,<?=$row2['latitude']?>,<?=$row2['longitude']?>);
    		<?
    		}
    		else{
    		?>
    		var vmarker = cvmarker(point,eval('iconf'+k),popup,<?=$row2['vehid']?>,<?=$row2['lid']?>,<?=$row2['latitude']?>,<?=$row2['longitude']?>);
    		<?
    		}
    		?>
    		//var vmarker=new GMarker(point,eval('icon'+k));
    		
           map.addOverlay(vmarker);
    	   <?
    		$result3=mysql_query("select * from vehicles where action='line' and transit!='no' and transit!=' '");
    		while($row3=mysql_fetch_array($result3)){
    		$action=$row3['action'];
    		$latitudes=$row3['latitudeold'];
    		$lat3=$row3['latitude1'];
    		$longitudes=$row3['longitudeold'];
    		$long3=$row3['longitude1'];
    		?>
    			draw(<?=$latitudes?>,<?=$longitudes?>,<?=$lat3?>,<?=$long3?>);
    		<?
    		}
    		?>
    			  k++;
    
                           }
    			     else if(newpoints[i][0]=='<?php echo $lat;?>' && newpoints[i][1]=='<?php echo $lon;?>' && (val1=='<?php echo $vehicletype;?>' || val2=='<?php echo $vehicletype;?>'))
    		          {
    					 <?
                         $vid=$row2['vehid'];
    						$result3=mysql_query("select * from bookings where vid='$vid'");
    						$row3=mysql_fetch_array($result3);
    						?>
                     var popup ="";
    							popup +='<form name=\"form1\" method=\"post\" action=\"vehicleedit_act.php?id=<?=$reg?>\">';
    							popup +='<table>';
    							popup +='<tr><td><u>Vehicle Edit Form</u>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"viewalllocations.php?id=<?=$reg?>&vdel=yes\" onclick=\"return submitform();\">Delete</a></td><td>&nbsp;</td><td>&nbsp;</td><td><a href=\"javascript:void(0)\" onclick=window.open(\'expenses_edit.php?id=<?=$row2['vehid']?>\',\'mywindow\',\'width=600,height=500,scrollbars=yes,toolbar=yes,status=yes\')>Expenses Window</a></td></tr>';
    							popup +='</table>';
    							popup +='<table>';
    							popup +='<tr>';
    							popup +='<td>Registration Number:</td>';
    							popup +='<td><input type=text name=regid id=regid value=<?=$row2['vehid']?> readonly=readonly></td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>FromOffice:</td>';
    							popup +='<td><input type=text name=location id=location readonly=readonly value=<?=$row2['tolocation']?> ></td>';
    							popup +='<td>ToOffice:</td><td><input type=text name=tolocation id=tolocation value=<?=$row3['start_place']?>></td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Date Due Back:</td>';
    							popup +='<td><input type=text name=dateback id=dateback  readonly=readonly value=<?=$row3['end_date']?> ></td>';
    							popup +='<td>Date Due Out:</td><td><input type=text name=dateout id=dateout value=<?=$row3['start_date']?>></td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Time Due Back:</td>';
    							popup +='<td><input type=text name=timeback id=timeback value=<?=$row3['end_time']?>></td>';
    							popup +='<td>Time Due Out:</td><td><input type=text name=timeout id=timeout value=<?=$row3['start_time']?>></td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Make/Model:</td>';
    							popup +='<td><select name=vehicle id=vehicle><option value=<?php echo $row2['vmake'];?>><?php echo $row2['vmake'];?></option><option value=Mercedes Benz>Mercedes Benz</option><option value=BMW>BMW</option></select></td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Status:</td><td>&nbsp;&nbsp;<select name=statusinf>';
    							popup +='<option value=<?=$row2['status'];?>><?=$row2['status'];?></option>';
    							popup +='<option value=visible>visible</option>';
    							popup +='<option value=Semi Transparent>Semi Transparent</option>';
    							popup +='</select>';
    							popup +='</td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>In Transit:</td><td>&nbsp;&nbsp;YES<input type=radio name=yes id=yes value=yes checked>NO<input type=radio name=yes id=no value=no>';
    							popup +='</td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Existing Booking ID:</td><td>&nbsp;&nbsp;<input type=text name=bookid id=bookid value=<?=$row3['b_id']?> readonly=readonly>';
    							popup +='</td><td>New Booking ID:</td><td><input type=text name=newbookid id=newbookid value=<?=$row3['cl_id']?>></td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Staff reporting:</td><td>&nbsp;&nbsp;<input type=text name=staffreporting id=staffreporting value=<?=$row2['staffreporting'];?>>';
    							popup +='</td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Warning messages:</td><td>&nbsp;&nbsp;<lable><?=$row2['warningmsgs'];?></lable>';
    							popup +='</td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Comments:</td><td>&nbsp;&nbsp;<textarea name=comments><?=$row2['vcomments'];?></textarea>';
    							popup +='</td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>Messages:</td><td>&nbsp;&nbsp;<textarea name=messages rows=2 cols=20><?=$row2['vnotes'];?></textarea>';
    							popup +='</td>';
    							popup +='</tr>';
    							popup +='<tr>';
    							popup +='<td>VehiclePhoto:</td>';
    							popup +='<td><img src=<?=$row2['imageFile1'];?> width=130 height=70></td>';
    							popup +='</tr>';
    							popup +='</table>';
    							popup +='<table>';
    							popup +='<tr><td><input type=submit name=submit value=Submit></td></tr>';
    							popup +='</table>';
    							popup +='</form>';   
    							<?
    	$status=$row2['status'];
    	if($status=='visible'){
    	?>
    		var vmarker = cvmarker(point,eval('icons'+k),popup,<?=$row2['vehid']?>,<?=$row2['lid']?>,<?=$row2['latitude']?>,<?=$row2['longitude']?>);
    		//var vmarker=new GMarker(point,eval('icon'+k));
    		<?
    		}
    		else{
    		?>
    		var vmarker = cvmarker(point,eval('iconm'+k),popup,<?=$row2['vehid']?>,<?=$row2['lid']?>,<?=$row2['latitude']?>,<?=$row2['longitude']?>);
    		<?
    		}
    		?>
           map.addOverlay(vmarker);
    		 <?
    		$result3=mysql_query("select * from vehicles where action='line' and transit!='no' and transit!=' '");
    		while($row3=mysql_fetch_array($result3)){
    		$action=$row3['action'];
    		$latitudes=$row3['latitudeold'];
    		$lat3=$row3['latitude1'];
    		$longitudes=$row3['longitudeold'];
    		$long3=$row3['longitude1'];
    		//mysql_query("select * from markup where id='$location1
    		?>
    	
    		draw(<?=$latitudes?>,<?=$longitudes?>,<?=$lat3?>,<?=$long3?>);
    		//draw('-33.8401','151.1460','-33.8607','151.1407');
    		
    		<?
    		}
    		?>
    		
            k++;
                      }   
    				<?
    				}
    			?>
    		}
    	}
     
    function createMarker(point, icon, popuphtml) {
    	var popuphtml = "<div id=\"popup\">" + popuphtml + "<\/div>";
    	var marker = new GMarker(point, icon);
    	GEvent.addListener(marker, "click", function() {
    		marker.openInfoWindowHtml(popuphtml);
    	});
    	return marker;
    }
    function cvmarker(vpoint, vicon, vpopuphtml,id,lid,lati,long) {
    
    	var vpopuphtml = vpopuphtml;
    	var vmarker = new GMarker(vpoint , {
    	icon:vicon,
        draggable: true, 
        title: 'Drag me'
    });
    	GEvent.addListener(vmarker, "click", function() {
    		vmarker.openInfoWindowHtml(vpopuphtml);
    	});
    	 GEvent.addListener(vmarker, "dragstart", function() {
              vmarker.closeInfoWindow();
    		  //alert(lati);
    		  //alert(long);
    		 // draw(lati,long);
    		 
            });
    
            GEvent.addListener(vmarker, "dragend", function() {
              vmarker.openInfoWindowHtml("This vehicle is now in transit...");
    		   var point = vmarker.getPoint();
    	      map.panTo(point);
           document.getElementById("lat1").value = point.lat().toFixed(5);
           document.getElementById("lng1").value = point.lng().toFixed(5);
    	   document.getElementById('vid').value=id;
    	  document.getElementById('location').value=lid;
    	  var latiend=document.getElementById("lat1").value;
    	  var longend=document.getElementById("lng1").value;
    	  document.getElementById("sbutton").style.display = "block"; 
    	 
    	 // alert(latiend);
    	  //alert(longend);
    	  
    draw(lati,long,latiend,longend);
    
    
            });
    
    	return vmarker;
    }
    function draw(latii, longg,latiendd,longendd){
    var polyline = new GPolyline([
      		  new GLatLng(latii, longg),
      		  new GLatLng(latiendd, longendd)
    		], "#ff0000", 4);
    		map.addOverlay(polyline);
    
    }
    //]]>
    </script>
     <script>
    function pagechange(){
    window.location.href='maphome.php';
    }
    function pagechange1(){
    window.location.href='add_marker.php';
    }
    function pagechange2(){
    window.location.href='editoffice.php';
    }
    function add_vehicle(){
    window.location.href='addvehicle.php';
    }
    function list_offices(){
    window.location.href='viewalllocations.php';
    }
    </script>
    <style type="text/css">
    div#popup {
    background:#EFEFEF;
    border:1px solid #999999;
    margin:0px;
    padding:7px;
    width:270px;
    }
    </style>
    </head>
    <body bgcolor="#ffffff" style="width:100%;height:100%; margin:0 0 0 0;overflow-x:auto; overflow-y:hidden" scroll="no" >
    <table align="center" width="100%" cellspacing="0" cellpadding="0" height="100%">
    <tr><td valign="top" style="width: 100; height: 30;"><input type="button" name="button1" value="Home" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF" onclick="pagechange()" />&nbsp;
    <?
    	if($_SESSION['user']!='admin'){
    	?>
    <input type="button" name="button2" value="Add Office" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF" />
    	<?
    	}
    	else{
    	?>
    	<input type="button" name="button2" value="Add Office" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF" onclick="pagechange1()" />
    	<?
    	}
    	?>
    &nbsp;
    <?
    	if($_SESSION['user']!='admin'){
    	?>
    <input type="button" name="button2" value="Add vehicle" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF"/>
    <?
    	}
    	else{
    	?>
    	<input type="button" name="button2" value="Add vehicle" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF" onclick="add_vehicle()" />
    	<?
    	}
    	?>
    &nbsp;&nbsp;
    <input type="button" name="button2" value="List Offices" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF" onclick="list_offices()" />&nbsp;&nbsp;<input type="button" name="button2" value="List Vehicles" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF" onclick="list_offices()" />&nbsp;&nbsp;
    <?
    if($_SESSION['user']!='admin' && $_SESSION['user']!='subadmin'){
    ?>
    <input type="button" name="button2" value="Edit Office" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF"/>
    <?
    }
    else{
    ?>
    <input type="button" name="button2" value="Edit Office" style="font-weight: bold; border: 3px ridge #E2E2E2; background-color: #808080; font-family:Arial; color:#FFFFFF" onclick="pagechange2()" />
    <?
    }
    ?>
    </td></tr>
    <tr><td valign="top" align="center"><table width="100%" height="565%" align="center">
    <tr><td><div id="map" style="position:absolute;top:26px; padding-bottom:30px; left:0px; width:100%; height:100%;"></div></td></tr>
     <form name="f1" method="post" action="viewalllocations.php?lat1=<?=$_POST['lat1']?>&lng1=<?=$_POST['lng1']?>&user=<?=$_SESSION['user']?>">
      <input type="hidden" name="lat1" id="lat1" value=""/>
    
        <input type="hidden" name="lng1" id="lng1" value=""/>
     
       <input type="hidden" name="vid" id="vid" value=""/>
       <input type="hidden" name="location" id="location" value=""/>
       <tr><td align="center">
        <div id="sbutton" style="display:none; position:absolute;top:30px; padding-bottom:30px; left:0px; width:100%; height:100%;">
     <input type="submit" name="submit" value="Save" style="background:#0099CC; width:70px; height:35px;" />
     </div>
     </td></tr>
    </form>
     
     </table>
    </td></tr>
    </table>
    </body>
    </html>


    Thanks
    Swetha

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I just tested that url in IE8 and it works fine. Do you have any type of antivirus or firewall enabled? Also this really isn't a php issue. Its a javascript issue. Just because you have php in your page doesn't mean its causing this as php is ran on the server not the client.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,978
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    ... Also this really isn't a php issue. Its a javascript issue. Just because you have php in your page doesn't mean its causing this as php is ran on the server not the client.
    Agreed. Moving to the JS forum.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,730
    Thanks
    202
    Thanked 2,507 Times in 2,485 Posts
    window.open(url_add,'welcome','width=300,height=200,menubar=yes,status=yes,location=yes,toolbar=yes, scrollbars=yes');


    Remove line breaks.


  •  

    Posting Permissions

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