base is extended by sub, which is further extended by subsub. We create a new instance of this subsub and call the inherited method. simple.
function base (){};
base.prototype.foo=function(){
alert('base prototype foo');
};
var b = new base();
b.foo = function(){alert('base.foo');};
function sub(){};
sub.prototype=b;
function subsub(){};
subsub.prototype= new sub();
function sss(){};
sss.prototype=new subsub();
function test(){
//var b = new base();
alert('b.foo\n' + b.foo);
//alert('b.prototype foo\n' + b.prototype);
//var s0 = new sub();
//alert('s0.foo\n'+ s0.foo);
//alert('s0.prototype.foo\n' + s0.prototype.foo);
var ss= new sss();
alert( 'sss.foo\n' + ss.foo);
alert(sss.toString());
//ss.foo();
ss.prototype.foo();
};
test();
function base (){};
base.prototype.foo=function(){
alert('base prototype foo');
};
var b = new base();
b.foo = function(){alert('base.foo');};
function sub(){};
sub.prototype=b;
function subsub(){};
subsub.prototype= new sub();
function sss(){};
sss.prototype=new subsub();
function test(){
//var b = new base();
alert('b.foo\n' + b.foo);
//alert('b.prototype foo\n' + b.prototype);
//var s0 = new sub();
//alert('s0.foo\n'+ s0.foo);
//alert('s0.prototype.foo\n' + s0.prototype.foo);
var ss= new sss();
alert( 'sss.foo\n' + ss.foo);
alert(sss.toString());
//ss.foo();
ss.prototype.foo();
};
test();
Saturday, July 25, 2009
Object oriented JS
I was going th the object oriented js and below is the basic example
Monday, July 20, 2009
Never argue with woman..
Never Argue with a Woman
One morning the husband returns after several hours
One morning the husband returns after several hours
of fishing and decides to take a nap.
Although not familiar with the lake,
the wife decides to take the boat out.
She motors out a short distance,
anchors, and reads her book.
Along comes a Game Warden in his boat.
Along comes a Game Warden in his boat.
He pulls up alongside the woman and says,
'Good morning, Ma'am. What are you doing?'
'Reading a book,' she replies,
'Reading a book,' she replies,
( thinking , 'Isn't that obvious ? ')
'You're in a Restricted Fishing Area,' he informs her.
'I'm sorry, officer, but I'm not fishing. I'm reading'
'Yes, but you have all the equipment.
'You're in a Restricted Fishing Area,' he informs her.
'I'm sorry, officer, but I'm not fishing. I'm reading'
'Yes, but you have all the equipment.
For all I know you could start at any moment.
I'll have to take you in and write you up.'
'For reading a book,' she replies ,
'You're in a Restricted Fishing Area,'
'For reading a book,' she replies ,
'You're in a Restricted Fishing Area,'
he informs her again,
'I'm sorry, officer, but I'm not fishing.
I'm reading'
'Yes, but you have all the equipment.
'Yes, but you have all the equipment.
For all I know you could start at any moment.
I'll have to take you in and write you up.'
'If you do that,
'If you do that,
I'll have to charge you with sexual assault ,'
says the woman.
'But I haven't even touched you,' says the game warden.
'But I haven't even touched you,' says the game warden.
'That's true, but you have all the quipment.
For all I know you could start at any moment.'
'Have a nice day ma'am,' and he left.
'Have a nice day ma'am,' and he left.
MORAL :
Never argue with a woman who reads.
It's likely she can also think.
Just for laughs
Woman inspires us to great things, and prevents us from achieving them.
"There's a way of transferring funds that is even faster than electronic banking. It's called marriage."
"I've had bad luck with both my wives. The first one left me, and the second one didn't."
Two secrets to keep your marriage brimming
1. Whenever you're wrong, admit it,
2. Whenever you're right, shut up.
The most effective way to remember your wife's birthday is to forget it once...
My wife and I were happy for twenty years. Then we met..
A good wife always forgives her husband when she's wrong.
First Guy (proudly): "My wife's an angel!"
Second Guy: "You're lucky, mine's still alive."
"There's a way of transferring funds that is even faster than electronic banking. It's called marriage."
"I've had bad luck with both my wives. The first one left me, and the second one didn't."
Two secrets to keep your marriage brimming
1. Whenever you're wrong, admit it,
2. Whenever you're right, shut up.
The most effective way to remember your wife's birthday is to forget it once...
My wife and I were happy for twenty years. Then we met..
A good wife always forgives her husband when she's wrong.
First Guy (proudly): "My wife's an angel!"
Second Guy: "You're lucky, mine's still alive."
Saturday, July 18, 2009
Thursday, July 16, 2009
Thats MOM

WHEN I CAME DRENCHED IN THE RAIN…………………
BRO SAID : “ WHY DON’T YOU TAKE AN UMBRELLA WITH YOU?”
SISTER SAID:”WHY DIDN’T YOU WAIT TILL IT STOPPED”
DAD ANGRILIY SAID: “ONLY AFTER GETTING COLD YOU WILL REALISE”.
BUT MY MOM AS SHE WAS DRYING MY HAIR SAID”
“STUPID RAIN”
Tuesday, July 14, 2009
LockedHard Drive weight increasing?
heres a funny post my friend had just forwarded me... hope the author wanted to spread some smile and hence asked it.
http://social.answers.microsoft.com/Forums/en-US/vistahardware/thread/720108ee-0a9c-4090-b62d-bbd5cb1a7605
http://social.answers.microsoft.com/Forums/en-US/vistahardware/thread/720108ee-0a9c-4090-b62d-bbd5cb1a7605
Monday, July 13, 2009
Subscribe to:
Posts (Atom)




