Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Objects with Javascript
- From: javascript@xxxxxxxxxx (Edward Tisdale)
- Subject: [Javascript] Objects with Javascript
- Date: Thu, 27 Jun 2002 21:05:05 -0700 (PDT)
Good question and I will look into it.
--- anand <anandkan@xxxxxxxx> wrote:
> hi
>
> pl use following code and try
>
> <script language="javascript">
> function mo()
> {
> alert("I am in object");
> }
> function ToolBarController()
> {
> this.i = 0;
> this.mos=mo;
> //note this.<name>=<function name>
> // <name> can be any string. here <name>=mos and
> <function name> = mo
> (defiined above)
> //<name> should match the name of the function
> invoked upon creating the
> obj
> //in this case TBC.mos() as in test fn
>
> }
>
> function test()
> {
> TBC = new ToolBarController();
> TBC.mos();
> }
> </script>
> </head>
> <body onLoad="test()">
>
> for more info on javascript object pl visit
>
> 1)http://wsabstract.com/javatutors/object.shtml
>
> 2)http://www-106.ibm.com
> and search for "creating and using javascript
> objects" Tutorials
>
> bye
>
> mohan
>
> -----Original Message-----
> From: javascript-admin@xxxxxxxxxx
> [mailto:javascript-admin@xxxxxxxxxx]On
> Behalf Of Pramod Jain, INDENT
> Sent: 27 June 2002 03:03
> To: javascript@xxxxxxxxxx
> Subject: [Javascript] Objects with Javascript
>
>
> I am trying to do a simple example with a method in
> a class and I get a
> "Object does not support this property". Does
> Javascript support such
> stuff...or...please let me know what I am doing
> wrong:
>
> <html>
> <head>
> <script language="javascript">
> function ToolBarController() {
> this.i = 0;
> function mo() {
> alert("I am in");
> }
> }
>
> function test() {
> TBC = new ToolBarController();
> TBC.mo();
> }
> </script>
> </head>
> <body onLoad="test()">
> </body></html>
>
>
>
>
> Pramod Jain
> INNOVATIVE DECISION TECHNOLOGIES, INC.
> (INDENT)
> 904.636.6374 X 12
> www.indent.org
>
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
- References:
- [Javascript] Objects with Javascript
- From: anand
- [Javascript] Objects with Javascript
- Prev by Date: [Javascript] Objects with Javascript
- Next by Date: [Javascript] https://lists.latech.edu/pipermail/javascript/2001-October/002380.html
- Previous by thread: [Javascript] Objects with Javascript
- Next by thread: [Javascript] is it better to use an 2 arrays or an object
- Index(es):