Object-Oriented Programming with JavaScript


In this column we embark on a short series about Object-Oriented Programming (00P) with JavaScript. In Part I of this series, we will cover the fundamentals. We will show you how JavaScript fulfills one of the most important requirements from an object-oriented language: inheritance. The examples in this part will also demonstrate the other requirement: encapsulation. We’ll leave the third requirement, polymorphism, to other parts of this series.

Continue reading

Dynamically Resizing Images


One of the biggest criticisms facing Dynamic HTML(DHMTL) in relation to Flash is DHTML’s seeming inability to scale pages relative to a browser’s dimensions. To overcome this problem, three central areas need to be focused upon:

  1. Dynamic Font Scaling.
  2. Layer Resizing.
  3. Element Resizing

Each of these key areas need to accommodate differing browser dimensions, while at the same time maintaining the same layout and feel of the page. It’s no easy task, but it is possible with the help of a little JavaScript magic.

Continue reading

Matrix Calculator Applet


Online tool for matrix calculation with javascript.

All Matrices must be n x n
Maximum Matrix Size: 50 x 50
Enter Matrix Elements Row by Row seperated by spaces.
Ex. (3×3)

1 2 3
4 5 6
7 8 9

Or if you like, as one line:

1 2 3 4 5 6 7 8 9
Both of these example matrices are the same.
Most results will be placed in the C matrix.

Continue reading

JavaScript : Cookies


Here’s a brief tutorial on how to use cookies using JavaScript. A cookie is a way you can store a tiny bit of information from a user visiting your site. The information is stored on the users computer, and thus does not require any extra server space no matter how many users you may have.

Worried about issues regarding the safety, and security of using cookies. They are more or less harmless.

Continue reading

GeeBalls I Applet


This applet shows a ball bouncing around a window. You can set the initial properties below in the form, and then change some properties such as mass, speed and elasticity, while the applet is running.

Set the initial conditions using the form below. Click Start, or Use Defaults will start the Applet running, a seperate window will open up, so don’t be startled or upset. The bold items can be changed while the applet is running.
Continue reading

JavaScript : Pop-up Windows


JavaScript allows you to create (open) new windows. In these windows you can place whatever HTML code you wish, and even have actions in one window effect what is happening in another window,

The code to open a new window is fairly straight forward, it only gets complicated when you add in all the different options available, and navigating around the different windows.

Continue reading

JavaScript : Mailing 404 Error Information


When a someone tries to go to a page that is not on this site they will get a 404 error. A 404 error is the HTTP server code for file not found. The server then displays an error message which is just a HTML message that can be specified, this means it can be customized and made useful.

Click here for an example of a broken link to see the 404-error served up by JSResource.com.
Continue reading