Posts Tagged ‘Javascript’

23
Jan

Create two dimensional arrays

   Posted by: Pradeep    in Scripting

Lets understand how to create a two dimensional javascript arrays. First create a singular list of arrays

var country0StateList = new Array("Country0-State0","Country0-State1","Country0-State2","Country0-State3");
var country1StateList = new Array("Country1-State0","Country1-State1","Country1-State2","Country1-State3");
var country2StateList = new Array("Country2-State0","Country2-State1","Country2-State2","Country2-State3");
var country3StateList = new Array("Country3-State0","Country3-State1","Country3-State2","Country3-State3");

Create an array of arrays with

var countries = new Array(country0StateList,country1StateList,country2StateList,country3StateList);

Voila, the variable countries now is a two dimensional array.

Tags:

12
Oct

JQuery Framework

   Posted by: Pradeep    in JQuery

In my previous project I came across this lightweight javascript framework called JQuery - a free and a open source software. After couple of coding I literally fell in love with it. It is amazingly fast and simple to understand. JQuery emphasizes interaction between javascript and HTML. I’ve tried my hands on YUI Framework, but JQuery is truly easier to code. JQuery was relased in Jan 2006 at a BarCamp by John Resig.

JQuery exists as a single JavaScript file and that single file contains all the common DOM, Event, Effects and Ajax functions.

I intend to do few tutorials on this site in which I can emphasize and illustrate more convincingly.

Tags: , ,

30
Sep

To check if flash plugin is installed

   Posted by: Pradeep    in Scripting

Here is the code that will help us to determine if flash is installed on the browser. To know if flash is installed in IE, we need to get around it using VB Script. The reason:

IE does not populate the available plugins in navigator.plugins array. The plugin array is always empty irrespective of installed plugins. The only way we can check if the plugin is installed in IE is by using the createObject method available in VBScript. Read the rest of this entry »

Tags: