Wrox Programmer Forums
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2011, 02:53 AM
Authorized User
 
Join Date: Oct 2010
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default Map do not show on Chrome

Hello everybody

When using Google Chrome I get the "Google Chrome" alert, which occurs after the init function is called, but I never get the f1() function.
If you have any further ideal, please help me

Thanks in advance

function loadXML() {
bounds = new GLatLngBounds();
markerList = [];
map.clearOverlays();
var error = "";
var file = "hotels/MapData.aspx";

try //Internet Explorer
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.load(file);
f1();
}
catch (e)
{
try //Firefox, Mozilla, Opera, etc.
{
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.async = false;
xmlDoc.load(file);
f1();
}
catch (e)
{
try //Google Chrome
{
alert("Google Chrome");
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open("GET", file, false);
xmlhttp.send(null);
xmlDoc.load(file);
xmlDoc = xmlhttp.responseXML.documentElement;
f1();

}
catch (e)
{
error = e.message;
}
}
}


}
 
Old April 16th, 2011, 12:43 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

I'm also a JS programmer, and about 4 months ago I started with a new company that uses jQuery for all it's AJAX communications. I hadn't really worked with AJAX much before this, I'm mainly a server side programmer.

I think you would really prefer letting jQuery do all of this fundamental AJAX processing for you, especially since their team of developers has worked out virtually all of the really nasty cross-browser stuff over the course of years. It frees you from learning all that stuff over the next several years before your program will work, and you can just focus on making your program do what you want it to do. The thing I really like about jQuery though is that it doesn't impose any constraints on you. It's just a function library; if there are useful functions that you want to use, you use them. If not, you just write your custom code the way that makes the most sense to you. You're not required to relearn how to do simple things in javascript via some complex new tool (like when you work with CMSs like WordPress or frameworks like drupal).
http://api.jquery.com/jQuery.ajax/
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Previewing in IE and Chrome WillieO BOOK: Beginning HTML, XHTML, CSS, and JavaScript 3 February 1st, 2011 02:43 PM
Menus in Chrome, Ch 7 p244- Alanrf BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 9 May 17th, 2010 01:37 PM
zXml.js for Chrome jabadia BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 October 5th, 2009 09:41 AM
Heat Map over Google Map ajit Javascript 0 March 7th, 2008 09:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.