Serious JavaScript


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Serious JavaScript

  1. #1
    Join Date
    Dec 2005
    Posts
    134

    Serious JavaScript

    For a computer programmer, JavaScript is not difficult. It is pretty easy to look at some code for the first time and figure out what is going on.

    This is especially true if you have gratuated from an old-fashioned top-down programmer to an object oriented computer programmer. I mean, most Javascript has a look where things are sectioned off into functions.

    This is pretty much true until one gets into DHTML and a very cool open-source thingy called DYNAPI that is all open source and is all javascript. With DHTML (aka Dynamic HTML) you can do a lot of interesting things which, when run on an IE browser, looks a lot like Flash: http://www.gelsana.com/examples/dynapi.fx.fader.html

    So naturally I want to experiment with this and figure out how do modify the examples to this.

    The javascript (.js) file looks like this.
    http://www.gelsana.com/Flash2.html

    Some of it is easy to understand but some of it looks like object oriented programming.

    Does anyone know how all this works or where I can go to find out how it works?

  2. #2
    Join Date
    Dec 2005
    Posts
    134
    I understand that javascript can use functions as objects or classes.
    But how do I learn how this all works together?
    For instance, in the copy of the DynAPI javascrpt file you can see this bit of code
    Code:
    function DynObject() {
        this.id = "DynObject"+DynObject._c++;
        DynObject.all[this.id] = this;
    };
    Where is .id defined? Is it an element of the DynObject class that is
    predefined with all javascript classes? Is the same true for the element .all as well?

    Following this object declaration (if that is what it is) there is this
    line of code:
    Code:
    var p = DynObject.prototype;
    Where is .prototype defined? Is it also a predefined element?
    How is it used?

Similar Threads

  1. Replies: 5
    Last Post: 05-06-2006, 10:22 PM
  2. problems with javascript
    By Michael in forum ASP.NET
    Replies: 10
    Last Post: 11-08-2005, 12:19 PM
  3. Help with Javascript in forms
    By Keith Sarver in forum Web
    Replies: 0
    Last Post: 12-14-2002, 02:18 PM
  4. Sample Sites.
    By Murray Foxcroft in forum Web
    Replies: 5
    Last Post: 11-02-2000, 02:42 AM
  5. How to suppress JavaScript
    By Phil in forum Web
    Replies: 1
    Last Post: 04-04-2000, 07:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center