Post Top Ad

Post Top Ad

Sunday, June 29, 2008

8:43 PM

Easy Draggable Table Columns: Dragtable

Dragtable is a JavaScript library for making the columns of a table draggable.

It is very easy to use as inserting the dragtable.js in our code and adding the class="dragtable" to any table is enough.

Tables become more functional with Dragtable as you can put the columns you think important side-by-side and have a better view.

It can also be used with the famous Sorttable library which will make the standard tables both draggable and sortable.

Requirements: No Requirements
Compatibility: All Major Browsers
Website: http://www.danvk.org/wp/dragtable/

Monday, June 2, 2008

10:40 PM

HOW IT'S DONE

Here's the entire page, minus my comments. Take a few minutes to learn as much as you can from this, then I'll break it down into smaller pieces.

<HTML>
<HEAD>


<SCRIPT LANGUAGE="JavaScript">

<!-- Beginning of JavaScript -


function MsgBox (textstring) {

alert (textstring) }


// - End of JavaScript - -->

</SCRIPT>


</HEAD>





<BODY>

<FORM>

<INPUT NAME="text1" TYPE=Text>

<INPUT NAME="submit" TYPE=Button VALUE="Show Me" onClick="MsgBox(form.text1.value)">

</FORM>


</BODY>

</HTML>

Sunday, June 1, 2008

11:26 PM

Objects and Properties

Your web page document is an object. Any table, form, button, image, or link on your page is also an object. Each object has certain properties (information about the object). For example, the background color of your document is written document.bgcolor. You would change the color of your page to red by writing the line: document.bgcolor="red"

The contents (or value) of a textbox named "password" in a form named "entryform" is document.entryform.password.value.

Methods

Most objects have a certain collection of things that they can do. Different objects can do different things, just as a door can open and close, while a light can turn on and off. A new document is opened with the method document.open() You can write "Hello World" into a document by typing document.write("Hello World") . open() and write() are both methods of the object: document.

Events

Events are how we trigger our functions to run. The easiest example is a button, whose definition includes the words onClick="run_my_function()". The onClick event, as its name implies, will run the function when the user clicks on the button. Other events include OnMouseOver, OnMouseOut, OnFocus, OnBlur, OnLoad, and OnUnload.