blog.michaelfasani.com

Blog, What?

Monday, August 18, 2008

Learning jQuery

jQuery is a JavaScript library. JavaScript Libraries simplify how you traverse HTML documents, handle events, perform animations and add Ajax interactions to your web pages. They deliver your code so that it works across all common browsers. jQuery is designed to change the way that you write JavaScript and allow you to add functionality to your pages quicker.

The official jQuery site

Learn about the jQuery JavaScript library, how to install it and how to add functionality to your pages.
http://www.jquery.com

Visual jQuery by Remy Sharp

A quick visual reference guide with examples of what can be achieved with jQuery.
http://www.remysharp.com/visual-jquery

jQuery API by Remy Sharp

Another reference guide to functions available to you in jQuery by Remy Sharp.
http://www.remysharp.com/jquery-api

jQuery General Discussion Forum

This is the best place to post if you have general questions or concerns. Also, if you’ve built a site that uses jQuery, or would like to announce a new plugin, this is the place to do it.
http://www.nabble.com/jQuery-General-Discussion-f15494.html

Learning jQuery

Getting to know the library of choice for unobtrusive JavaScript a an informative jQuery blog.
http://www.learningjquery.com

jQuery Menu Firefox Extension

Add this handy menu right into the top of your Firefox menu and save valuable seconds!
http://www.kintek.com.au/jquery-menu-firefox-extension.html

jQuery for designers

What it says on the tin, jQuery for Designers. A informative blog.
http://www.jqueryfordesigners.com

posted by Michael Fasani at 11:38 am  

Wednesday, August 13, 2008

Limiting a multi-line Textbox/Textarea with JavaScript

Its not possible to put a character limit on multi line text box areas in HTML/XHTML so you have to use some form of JavaScript snippet, here is a snippet I use, because its quick and very simple to customize.

<script type="text/javascript">
//Max length multiline textbox checker
function checkMaxLen(txt,maxLen) {
try{
if(txt.value.length > (maxLen-1)) {
var cont = txt.value;
txt.value = cont.substring(0,(maxLen -1));
return false;
};
}catch(e){
}
};
</script>

Then use the following code on the Textarea tag.

<textarea onkeyup="return checkMaxLen(this,5000)"></textarea>

You simply set the text limit by changing the value in the JavaScript function from 5000 to what ever number of characters you need.

posted by Michael Fasani at 7:59 pm  

Powered by WordPress