Click here to Skip to main content
15,899,754 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: little problem!! Pin
Abhijit Jana29-Jul-09 5:09
professionalAbhijit Jana29-Jul-09 5:09 
GeneralRe: little problem!! [modified] Pin
zeeShan anSari29-Jul-09 5:33
zeeShan anSari29-Jul-09 5:33 
AnswerRe: little problem!! Pin
zeeShan anSari29-Jul-09 5:53
zeeShan anSari29-Jul-09 5:53 
AnswerRe: little problem!! Pin
Christian Graus29-Jul-09 10:48
protectorChristian Graus29-Jul-09 10:48 
QuestionAdding ButtonColumn to GridView Dynamiclly Pin
reem_saeed29-Jul-09 4:22
reem_saeed29-Jul-09 4:22 
AnswerRe: Adding ButtonColumn to GridView Dynamiclly Pin
Abhijit Jana29-Jul-09 4:30
professionalAbhijit Jana29-Jul-09 4:30 
GeneralRe: Adding ButtonColumn to GridView Dynamiclly [modified] Pin
reem_saeed31-Jul-09 22:28
reem_saeed31-Jul-09 22:28 
Questiongoogle maps not working [modified] Pin
Member 468362029-Jul-09 3:28
Member 468362029-Jul-09 3:28 
Thank you for helping in advance, please see the code I attached below.

I'm currently working on integrating google maps to get the customer address from database and then display/mark the address on the google maps. So what I did was get the whole address into a hidden label control and get the text value of the control from within the javascript. The current situation is if I hard coded some value to the var address, everything works perfectly (no error and google maps display the hard coded address correctly). however when I use the document.getElementById, some error occured.

I tested the document.getElementById INSIDE the function with an alert, the alert message actually display the correct address value (as value in database), however an error ocurred IE: "Placemark.0 is null or not an object", so looks like the second function doesn't work properly. Please note that this message doesn't appear when I hard coded the var address value.

I'm not sure why, but I have a feeling that I might need to convert the document.getElementById to something, so it will become something like a hard coded value. Can someone please advice?

<script type="text/javascript" language=javascript>
		var geocoder;
		var map;
		
		//var address="new york, usa";
		//var address = document.getElementById("<%=lblmap.ClientID%>").innerHTML;
		
		function load()
		{
			//var address = document.getElementById("<%=lblmap.ClientID%>").innerHTML;
			var address="new york, usa";
			map = new GMap2(document.getElementById("map"));
			geocoder = new GClientGeocoder();
			geocoder.getLocations(address, addToMap);
                                      //alert(address);
		}
		
		function addToMap(response)
		{
			place = response.Placemark[0];
			point = new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);
			map.setCenter(point,13);
			marker = new GMarker(point);
			map.addOverlay(marker);
			marker.openInfoWindowHtml(place.address);
		}
			</script>
	</HEAD>
	<body onload="getTime();load();" onunload="GUnload()">


modified on Wednesday, July 29, 2009 9:39 AM

AnswerRe: google maps not working Pin
Abhishek Sur29-Jul-09 4:19
professionalAbhishek Sur29-Jul-09 4:19 
GeneralRe: google maps not working Pin
Member 468362030-Jul-09 4:48
Member 468362030-Jul-09 4:48 
GeneralRe: google maps not working Pin
Abhishek Sur30-Jul-09 21:51
professionalAbhishek Sur30-Jul-09 21:51 
GeneralRe: google maps not working Pin
Member 468362031-Jul-09 5:04
Member 468362031-Jul-09 5:04 
GeneralRe: google maps not working Pin
Member 46836201-Aug-09 19:10
Member 46836201-Aug-09 19:10 
GeneralRe: google maps not working Pin
Member 46836204-Aug-09 2:28
Member 46836204-Aug-09 2:28 
AnswerRe: google maps not working Pin
Abhishek Sur29-Jul-09 4:31
professionalAbhishek Sur29-Jul-09 4:31 
QuestionHow to make Main Menu and Sub Menu Using Rpeater Control in asp.net ( not Main Menu only) Pin
blainzaw29-Jul-09 3:25
blainzaw29-Jul-09 3:25 
AnswerRe: How to make Main Menu and Sub Menu Using Rpeater Control in asp.net ( not Main Menu only) Pin
Vimalsoft(Pty) Ltd29-Jul-09 3:26
professionalVimalsoft(Pty) Ltd29-Jul-09 3:26 
Questionwhat is API Pin
Ashwini.dg29-Jul-09 3:21
Ashwini.dg29-Jul-09 3:21 
AnswerRe: what is API Pin
Manas Bhardwaj29-Jul-09 3:24
professionalManas Bhardwaj29-Jul-09 3:24 
AnswerRe: what is API Pin
Vimalsoft(Pty) Ltd29-Jul-09 3:25
professionalVimalsoft(Pty) Ltd29-Jul-09 3:25 
AnswerRe: what is API Pin
Victor.Ai.29-Jul-09 13:13
Victor.Ai.29-Jul-09 13:13 
QuestionProblem displaying Windows Control in ASP.net Web Site. Pin
VikashGohil29-Jul-09 3:19
VikashGohil29-Jul-09 3:19 
AnswerRe: Problem displaying Windows Control in ASP.net Web Site. Pin
Vimalsoft(Pty) Ltd29-Jul-09 3:23
professionalVimalsoft(Pty) Ltd29-Jul-09 3:23 
GeneralRe: Problem displaying Windows Control in ASP.net Web Site. Pin
VikashGohil29-Jul-09 3:50
VikashGohil29-Jul-09 3:50 
GeneralRe: Problem displaying Windows Control in ASP.net Web Site. Pin
Vimalsoft(Pty) Ltd29-Jul-09 4:35
professionalVimalsoft(Pty) Ltd29-Jul-09 4:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.