ExtJS Javascript Library for Beginners!

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

Posts Tagged ‘javascript

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 , ,

Javascript video tutorials / lectures

leave a comment »

Been on my summer holidays so no blogging for the last week, so whats new I bet you’re thinking – you never blog anyway.

No well, you’re right, but I have some great Javascript resources for you to watch! yes not read… watch… so sit back fire up your browser and let the information come to you.

Douglas Crockford Javascript Lectures part 1

Douglas Crockford Javascript Lectures part2

Douglas Crockford Javascript Lectures part 3

Douglas Crockford Javascript Lectures part 4

If you watch all of those, you could go on and read this:
JavaScript Tips for Novices, Acolytes, and Gurus and then explain it to me :)

Laters

Written by jameshd

6th August, 2008 at 6:38 pm

Console logging and debugging with Firebug

leave a comment »

Guy and Girls…

Firebug rocks. If you haven’t been using it already you shouldn’t really call yourself a JavaScript programmer, or a web developer for that matter.

Get Firebug installed and read the tutorial on logging and debugging. It makes your code a heck of a lot cleaner and removes the need for annoying alerts everywhere!

If you’re not using Firefox, firstly why not? and secondly here’s a list of web development tools for Internet Explorer. Go fill ya boots! However, a better solution exists for those who are Firebug enthusiasts but have crappybrowseritus, this is something I’ve not tried out but should work for IE, Opera and Safari browsers. Use Firebug Lite to debug javascript in IE, Safari and Opera – if you have tried this, please let me know how you got on.

Cheers

James

Written by jameshd

20th July, 2008 at 8:19 pm

Follow

Get every new post delivered to your Inbox.