473,387 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Override method in JavaScript

I need to override base class method in child class. And in it
overriden method call base class method. How can I do this?

Oct 20 '06 #1
3 2374

russell wrote:
I need to override base class method in child class. And in it
overriden method call base class method. How can I do this?
Hi

I don't think calling a base (or super) class method is possible
natively, but it can be emulated.

For one way of achieving this, take a look at:-

<URL:http://dean.edwards.name/weblog/2006/03/base/>

Regards

Julian Turner

Oct 20 '06 #2

Julian Turner wrote:

[snip]
For one way of achieving this, take a look at:-

<URL:http://dean.edwards.name/weblog/2006/03/base/>
Or another:-

<URL:http://www.crockford.com/javascript/inheritance.html>

Julian

Oct 20 '06 #3
Thank you! Your articles are helpful for me.

Oct 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bob | last post by:
This seems to me like it should work but I get "generic" no matter which button I click. Javascript is not one of my better languages. Can the experts here take a look at this and tell me what I'm...
14
by: JPRoot | last post by:
Hi I use the following syntax to have events inherited from base to child classes which works nicely (virtual and override keyword on events). But I am wondering if it is a "supported" way of using...
7
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override...
5
by: Mark Broadbent | last post by:
Oh yes its that chestnut again! Ive gone over the following (http://www.yoda.arachsys.com/csharp/faq/ -thanks Jon!) again regarding this subject and performed a few of my own tests. I have two...
15
by: John Salerno | last post by:
Hi all. I have a question about virtual and override methods. Please forgive the elementary nature! First off, let me quote Programming in the Key of C#: "Any virtual method overridden with...
15
by: Cliff_Harker | last post by:
Why can't I do this in C# public class A { public A virtual whatever( A a ) { } } public class B : A
1
by: relient | last post by:
I'm learning about the virtual table in association with virtual methods. I got most of the logic and understanding down (I believe) for when you use 'override' and no 'override' or no 'new'...
5
by: Marcel Hug | last post by:
Hi NG ! I'm new in C# and I'm reading a book about the fundamentals and concepts. In the chapter Methods it's written to use virtual, if i would like to override the method in a subclass. This...
5
by: Tony Johansson | last post by:
Hello! Here I have an Interface called ITest and a class called MyClass which derive this intrface. As you can see I don't implement this method myTest in class MyClass because i use the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.