Defining classes in jscript

Discussion in 'ASP .Net' started by Henke, Nov 28, 2003.

  1. Henke

    Henke Guest

    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, Nov 28, 2003
    #1
    1. Advertising

  2. Henke

    Hans Kesting Guest

    "Henke" <> wrote in message
    news:uAgf$...
    > 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
     
    Hans Kesting, Nov 28, 2003
    #2
    1. Advertising

  3. Henke

    Henke Guest

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

    "Hans Kesting" <> skrev i meddelandet
    news:...
    >
    > "Henke" <> wrote in message
    > news:uAgf$...
    > > 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
    >
    >
     
    Henke, Nov 28, 2003
    #3
  4. Henke

    Hans Kesting Guest

    "Henke" <> wrote in message
    news:...
    > Hi!
    > I mean client-side.
    > So I don't have to use the reserved word class, is that what you mean?
    > /Henke


    As far as I know, no.
     
    Hans Kesting, Nov 28, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon Maz
    Replies:
    4
    Views:
    1,317
    Jon Maz
    Sep 9, 2004
  2. Maxwell2006
    Replies:
    5
    Views:
    2,437
    Steven Cheng[MSFT]
    Mar 7, 2006
  3. John Bentley
    Replies:
    14
    Views:
    386
    Jim Ley
    Feb 5, 2004
  4. VK
    Replies:
    4
    Views:
    377
    Thomas 'PointedEars' Lahn
    Jan 12, 2006
  5. vasudevram
    Replies:
    6
    Views:
    950
    vasudevram
    Apr 24, 2013
Loading...

Share This Page