Hi Roberto Thanks for response ;
var p = {
element1 : "" ,
....
Initial : function(){
this.element1 = document.getElementById('some id');
},
....
MyFuction : function(){
this.element1.value="some text";
}
}
p.Initial();
p.MyFuction();
but it doesn't works too [?]
Any idea ?
On Sat, Oct 25, 2008 at 7:00 PM, Roberto Bouzout (tito) <[EMAIL
PROTECTED]>wrote:
> var p = {
>> element1 : document.getElementById('some id') ,
>> ....
>>
>> MyFuction : function(){
>>
>> element1.value="some text";
>> },
>>
>>
>> }
>>
>
> Properties of "p" from the "inside" are accessed by "this" keyword
> I think that this should work, but maybe there is another problem such
> document.getElementById('some id') is not defined when "p" is initialized.
> MyFuction : function(){
> this.element1.value="some text";
> },
>
> _______________________________________________
> Project_owners mailing list
> [email protected]
> https://www.mozdev.org/mailman/listinfo/project_owners
>
<<321.png>>
_______________________________________________ Project_owners mailing list [email protected] https://www.mozdev.org/mailman/listinfo/project_owners
