Archive for January, 2008

Internet Explorer : ”Operation aborted” Solution

Saturday, January 26th, 2008

If you ever worked with heavy JS codes or complex DHTML you may have already faced this error. This is like a nightmare. You are opening your web page. IE is loading the site. You see the progress bar. Suddenly you see a message “Internet Explorer cannot open the Internet site http://<Web site>.com. Operation aborted”. The dialog has only one button. so you press it. Then it shows “Page cannot be displayed”. You cannot even debug it. Cause you don’t see any source code. I searched many sites and forums. No one can say anything appropriately. See the MSDN site. They have some tips to avoid it. I don’t know how to reproduce it. But I’ll tell you a solution that worked for me. This solution works for me for jQuery javascript library.

In jQuery most initial operations are writen in domready block. That is,

jQuery(document).ready(

function(){

my_blah_blah_code();

}

);

The function there my_blah_blah_code() runs when DOM is ready. It means when all the elements is loaded in browser and its safe to manipulate it .

But I have seen its really not safe to manipulate it if we use the function jQuery(document).ready() block. You’ll say “No, its working for me”. Well then your lucky that its working. DOM also gives you a attribute in ‘body’ element. The ‘onload’ attribute. It always works. I never see it fails. Both ‘jQuery(document).ready()’ and ‘onload’ attribute gives the same functionality. But they are not same. To test it run a code like the following.

&amp;lt;script src="/path/to/jquery" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;

jQuery(document).ready(

function(){

alert("jQuery domready fires");

}

);

&amp;lt;/script&amp;gt;

You’ll see which alerts later. Its the browser. See the live example here. So its safer to use ‘onload’. Thats why I am using here only ‘onload’. No jQuery(document).ready() block. I am replacing the jQuery ready block by this,

<html>
<head>
<script type="text/javascript" src="/path/to/jquery"></script>
<script type="text/javascript">
function by_blah_blah_code(){
// Write all your initialization code here.
}
</script>
<body>
<script type ="text/javascript" >
if(document.body){
 if(document.all){
 document.body.onload = by_blah_blah_code;
 }else{
 document.body.setAttribute("onload","by_blah_blah_code()");
 }
}else{
 alert("This code must be included after the body tag ;)");
}
</script>
</body>
</html>

If you use it that way. You wont see any “operation aborted” error.

Best of luck.

© 2008 by A K M Mokaddim

Nine words women use

Thursday, January 24th, 2008

1

Fine This is the word women use to end an argument when they are right and you need to shut up.

2

Five Minutes If she is getting dressed, this means a half an hour. Five minutes is only
five minutes if you have just been given five more minutes to watch the
game before helping around the house.

3

Nothing This is the calm before the storm. This means something, and you should be on
your toes. Arguments that begin with nothing usually end in fine.

4

Go Ahead This is a dare, not permission. Don’t Do It!

5

Loud Sigh This is actually a word, but is a non-verbal statement often misunderstood by
men. A loud sigh means she thinks you are an idiot and wonders why she
is wasting her time standing here and arguing with you about nothing.
(Refer back to #3 for the meaning of nothing.)

6

That’s Okay This is one of the most dangerous statements a wom an can make to a man.
That’s okay means she wants to think long and hard before deciding how
and when you will pay for your mistake.

7

Thanks A woman is thanking you, do not question, or Faint. Just say you’re welcome.

8

Whatever Is a women’s way of saying F@!K YOU!

9

Don’t worry about it, I got it Another dangerous statement, meaning this is something that a woman has told a
man to do several times, but is now doing it herself. This will later
result in a man asking ‘What’s wrong?’ For the woman’s response refer
to #3.Then you RUN!

 

 

 

 

Note: I didnt write it my own. I collected it and shared it. So the creative common license will not be applied to this post.


Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Based on a work at talk.cmyweb.net.