25 Years of Programming
An open source source for C, C++, OWL, BASIC, MDB, XLS, DOT, and more...
Home   Projects   Up   Sitemap   Search   Blog   Forum+Chat   About Us   Privacy   Terms of Use   Feedback   FAQ   Images   Services   Ads   Donate

FAQ Contents

  1. Why does the text on some pages extend beyond my right screen margin?
  2. Why do pages load with "Object expected" errors?

Why does the text on some pages extend beyond my right screen margin?

A. All program source code was pasted into the pages with formatting preserved so it won't wrap. This makes it easier to see where the true line ends are and makes it easier to copy the text for your own use.

B. There are a few pages where explanatory and other non-code text might extend past the right margin when viewed with Internet Explorer 6 or previous versions. If you report these pages, I can restore them to IE6 compatibility. The pages will display properly in IE7 and Firefox.

Back to Top

Why do pages load with "Object expected" errors?

The short answer is: these errors are not really errors, and are harmless. The long answer is...

This site is using Google Analytics for site usage statistics. On each page there is some JavaScript code provided by Google that makes this possible. Some of the code resides directly on the page, but another portion of it is served (sent to your browser) by Google Analytics. "Object expected" errors occur when the two pieces run in two different Internet Explorer security zones such that one piece is allowed to run but the other is blocked.

Example:

Assume that the first section of JavaScript creates a variable and sets its value, but it is blocked from running because the code comes from a non-Trusted source in the Internet Zone. If there is a second section of JavaScript directly on the web page, and if it runs because that site is a Trusted Site, and if the code tries to use the value of the variable, it finds that the variable hasn't been created, so you get an Object Expected error.

If you have JavaScript globally enabled or globally disabled, you shouldn't get these errors.

But if you have made this site a Trusted Site in Internet Explorer (which usually allows JavaScript to run), then you will get these errors unless you also add http://*.google-analytics.com to your list of Trusted Sites. In another context, I have also had to add https://*.google-analytics.com.

It's not just Google Analytics. This Object Expected error can occur on any web page where multiple pieces of JavaScript, CSS, images, or other parts of the page, come from multiple different sources, even when the sources are just different servers at the same company.

The above security zone change is not necessary unless you find the errors annoying. This site only uses JavaScript for Google Analytics and to display the ads. Nothing critical here requires it.

Additional notes:

If you have similar problems with eBay pages, you can add http://*.ebaystatic.com and https://*.ebaystatic.com to your Trusted Sites (along with http://*.ebay.com and https://*.ebay.com), and it should solve the errors and make the pages display and function properly in Internet Explorer.

At Yahoo!, the problem can be solved by making http://*.yimg.com and https://*.yimg.com Trusted Sites.

At PayPal, the problem can be solved by making https://www.paypalobjects.com a Trusted Site.

At other sites, in IE7, you can click Page > View Source and search for the string src=. This will discover the remote sites from which JavaScript or other page elements are being retrieved. You may be able to get rid of the errors by making those sites Trusted Sites, but I wouldn't recommend doing that unless you are familiar with the sites and have confidence that they are trustworthy.

 

Back to Top

 

 

Valid HTML 4.01 Transitional Valid CSS
View content labeling at ICRA.
Copyright ©2007 Steven Whitney. Last modified 09/25/2007.