PDA

View Full Version : JS Libarys


crca
08-17-2002, 07:46 AM
:eek: :eek: :eek:

I am making a JS libary. In the file, I would like a variable 'crca.here' to be passed to the main page, but only 'crcahere' etc. works!

Could you please help me?

Thanks in advance!

:eek: :eek: :eek:

beetle
08-17-2002, 09:19 AM
Unless crca is an object, that syntax is not valid. Variable names cannot contain periods, that is reserved for the dot-syntax javascript uses for it's DOM structure.

crca_here would be ok
or
crcaHere also

The only wasy crca.here would be valid is like thisfunction crca(val1)
this.here = val1;
{

var dataObj = new crca('text'); Now we have object variable named crca where crca.here == text

Is this what you are doing?