Defining classes in jscript

  • Thread starter Thread starter Henke
  • Start date Start date
H

Henke

I know it's possible to define my own classes in jscript, but where should I
define them. If I define them inside a script section I get syntax error
when executing the page.
Thanks!

/Henke
 
Henke said:
I know it's possible to define my own classes in jscript, but where should I
define them. If I define them inside a script section I get syntax error
when executing the page.
Thanks!

/Henke

Do you mean server-side JScript.Net or client-side J(ava)Script?
Do you want those classes to exist server-side or client-side?

In client-side jscript you can make a function which will serve
as constructor and call it with "new"
var myObj = new myConstructorFunc(params);


Hans Kesting
 
Hi!
I mean client-side.
So I don't have to use the reserved word class, is that what you mean?
/Henke
 
Back
Top