i am writing javascript for something and it wont work on google chrome. it will work on everything else but chrome. can you please help? here is the code:

var title='CrazieToday - Best Event Organizer Ever';
var url='http://crazietoday.com';

function AddToFavorites(){
	if (window.sidebar) { 
window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { 
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) {
		return true; 
		}
    else if(window.chrome)
	{
    document.getElementById('chrome').style.display='block';
	}
}

thank you in advanced

Are you sure that the check for chrome is correct? Have you tried to use the Chrome's JavaScript debugger and try 'window.chrome' in the console? I am not sure that it is correct.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.