ExtJS Javascript Library for Beginners!

The Ext Javascript library for beginners, as I learn ExtJS so will you!

Archive for the ‘Patterns’ Category

Checking all your checkboxes with jQuery

leave a comment »

Ok I know this blog is geared towards ExtJS and I do expect you to lambast me for posting jQuery code snippets but, in my free time one lunch time I decided what it would be like to rewrite the ExtJS vertical checkbox examples I’ve been posting using jQuery.

Turns out, there’s not a great deal of difference in the length of the code, maybe the clarity and readability is slightly improved with jQuery, although looking at it there’s not a great deal in it. So for shits n giggles here’s my jQuery code:


<script type="text/javascript">

$(document).ready(function(){
$("#select_none").click(function(){
$(":checkbox").attr("checked", false);
$("#update_button").attr("disabled", true);
return false;
});

$("#select_all").click(function(){
$(":checkbox").attr("checked", true);
$("#update_button").attr("disabled", false);
return false;
});

// clear all checkboxes.
$("#select_none").click();

$(":checkbox").click(function(){
if($(this).attr("checked") == true)
{
if($("#update_button").attr("disabled")==true)
$("#update_button").attr("disabled", false);
}
else
{
if($(":checked").length == 0)
{
$("#update_button").attr("disabled", true);
}
}

})
});

FYI if you’re interested in checking out jQuery in more detail, have a look at the post over on Ajaxian filled with jQuery videos presented by John Resig himself.

Written by jameshd

22nd February, 2009 at 6:52 pm

Posted in Ext / Javascript, Patterns, PHP, Zend

Tagged with , ,

Aptana error missing plugin org.eclipse.ui

leave a comment »

If you get the

Aptana requires missing plugin org.eclipse.ui

It got it when trying to install the Adobe AIR extensions.
Simply navigate to your installation directory of Aptana and run

AptanaStudio.exe -clean

Which cleans the cache so I’m told.

see here

Written by jameshd

28th August, 2008 at 5:49 pm

Posted in Ext / Javascript, Patterns

Tagged with

Javascript Singleton Pattern explained

leave a comment »

Hi Folks,

Here’s a great site with an explanation of the Singleton design pattern in Javascript with examples.

Written by jameshd

1st April, 2008 at 10:11 pm

Posted in Patterns

Tagged with , ,

Follow

Get every new post delivered to your Inbox.