How to fix “operational abort” for Google Map in IE

The first task that I have to day is to fix Google Map “Operational Abort” in IE (Internet Explorer). It took me awhile to understand what happened at the back of it.

This is how to produce the error:

Go to any page with Google Map using the Internet Explorer.

Then go to another page, for example, by clicking the link from that page.

Hit “Back” to go back to Google Map page.

You will then receive “Operational Abort” error.

To solve it, I used the WindowOnload fix from: http://blog.firetree.net/2005/07/17/javascript-onload/

Here is how I used it, assuming that the code structure looks like this:

HTML HEAD

SCRIPT to include GMap Code

SCRIPT to ask GMap to do a cool trick – include GMap_init() function

HTML BODY

DIV your map is here

END HTML BODY

END HTML HEAD

The edited code:

HTML HEAD

HTML BODY

DIV your map is here

SCRIPT to include GMap Code

SCRIPT to ask GMap to do a cool trick

function WindowOnload(f) {
var prev=window.onload;
window.onload=function(){ if(prev)prev(); f(); }
}

WindowOnload(GMap_init); // call init() function.

END HTML BODY

END HTML HEAD

Feel free to try that out and let me know if it works 🙂

Display php error at runtime

With the production server, we have to disable the error reporting. However, sometime we need to really see the error for debugging purpose. We can use this code to display the error at runtime:

<?php
error_reporting(E_ALL);
ini_set(“display_errors”, 1);

Or we can better debug with an if statement, for example

<?php
if($_GET[‘SECRET_PASSWORD’] == ‘SOME SECRET PASSWORD’) {
error_reporting(E_ALL);
ini_set(“display_errors”, 1);
}

we can use a secret password to display error like: http://myurl.com?SECRET_PASSWORD=xxx

or we can limit to only our IP address (recommend).

Eclipse error: Resource is out of sync with the file system

Today when I tried to run the project in eclipse, I received this error: Resource is out of sync with the file system.

My solution is to do a refresh on the project via Project Explorer and start the server again.

Error when deleting file that has a long name

Today while I’m trying to delete a folder. I’ve received this ” The folder ‘                   ‘ contains items whose name is too long for the Recycle Bin.”

longname

longname

Does it make any sense to you?