Classes 
Author Message
 Classes

Hi All

i want to take the name of the instanc of the object that iv created to be
place in a property
like

function MyObj() {
 this.name = (Dont know what to put here to take the "x" that create an
instanc of the object) ;

Quote:
};

x = new MyObj() ;

Result should be :

x.name = "x" ;

THnax Alot !!!!!!!!!!!!!!



Mon, 28 Jun 2004 00:51:05 GMT  
 Classes
   function MyObj (n) {
     this.name = n;
   }
   var x = new MyObj('x');

Quote:

> Hi All

> i want to take the name of the instanc of the object that iv created to be
> place in a property
> like

> function MyObj() {
>  this.name = (Dont know what to put here to take the "x" that create an
> instanc of the object) ;

> };

> x = new MyObj() ;

> Result should be :

> x.name = "x" ;

> THnax Alot !!!!!!!!!!!!!!

--

        Martin Honnen
        http://javascript.faqts.com/
        http://home.t-online.de/home/martin.honnen/jsgoddies.html



Mon, 28 Jun 2004 06:42:43 GMT  
 Classes

Quote:

> Hi All
> i want to take the name of the instanc of the object that iv created to be
> place in a property
> like
> function MyObj() {
>  this.name = (Dont know what to put here to take the "x" that create an
> instanc of the object) ;
> };
> x = new MyObj() ;
> Result should be :
> x.name = "x" ;
> THnax Alot !!!!!!!!!!!!!!

---------------------------
function MyObj() {
 this.name = "x";
Quote:
}

---------------------------


Mon, 28 Jun 2004 08:47:21 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. class in a class

2. Any problems with VBScript class containing another class?

3. Can one CSS class inherit and extend another class?

4. VBScript Class - setting initial value of a variable within the Class gives an error - why??

5. ReDim dynamic array in Class fails outside the class. Why?

6. AreJscript Classes "True" classes that can be stored in ASP Session Variables?

7. Vbscript class in jscript page (ASP)

8. Storing Classes in the "Session" Object

9. VBScript Class

10. Class in asp...

11. Returning a recordset from a class

12. Load a class from the global.asa

 

 
Powered by phpBB® Forum Software