The following are examples of Objects.
Understanding Objects
An object is a way of modeling something real, even though the object is an abstract entity. When you think of an object, you'll probably want to visualize something in general, such as a car, or race tickets in my case. When you see a car, you see certain features, or properties. Those could include extras such as radios, interiors, engines or a sunroof for examples. And those can be broken down even further to determine types of radios, type of interior, type of engine, etc! Object are written using a combination of different JavaScript scripts, such as If/Else Statements and the use of Variables and Functions. Even operators will come into play! Event Handlers will be shown in the pre-determined Objects.
In my example, I am a ticket vendor and I have been contacted about prices for tickets to the NASCAR Cup Series race at the Atlanta, GA. race track for an upcoming event. First the form was submitted asking for further information on the tickets. Base price of the tickets is $50.00. Now depending on the location on the track, location in the stands and the section in the stands, the price will vary accordling! Upper Tier adds $25.00, Front Stretch add $50.00, Turn 1 add $40.00, Turn 4 add $35.00, Sections A-F and N-T add $10.00 and the Back Stretch add $5.00. The options are as follows:
Ticket Request Form:
Based on the submitted form (which you don't see), here is what would be sent back!
Now for Predefined JavaScript Objects, how would you like to see what browser and version you are using?
Perhaps you would like to know if you have Cookies enabled? (No, not Chocolate Chip!)
Now just for fun, lets show you everything you want (or didn't want) to know about your system in one easy step! (Unless you have Netscape, then many seem to come back undefined for reasons I am not 100% certain of!)
So there we are, at the end of Objects. I hope you enjoyed your visit and do come back for more Modules!"