The Javascript that I have included in my php created site is

<script type="text/javascript">
$(window).load(function(){
	setHeight();
});
if(navigator.userAgent.search(/msie/i)!= -1) {
} else {
	window.onresize = function(){
		setHeight();
	}
}
</script>

Would this cause my browsers (Firefox - IE - Chrome - Opera) to not work?

Recommended Answers

All 2 Replies

$(window).load(function(){
	setHeight();
});

this is not JavaScript, its jQuery, if you use it, please include your jquery.js before including this script, else, if you are not using jQuery, look for an other method.
By the way? what does this code should do? If this is not the solution, please post the full javascript files.

As Agarsia said, the script requires jquery library. One thing which is very obscure is the setHeight() function. If you have the function declared somewhere, it may be OK; otherwise, your web page will stop right where the script error occurs. Unless you are writing out the page content using JavaScript, the page should be rendered with or without unexpected display.

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.