Wednesday, March 25, 2009

JQuery and client side error handlers

A friend of mine, JK pointed out this awesome tutorial about jquery and error handling.
If you didn't know you could set an error handler on the client side, here's a short tutorial.

http://encosia.com/2009/03/04/use-jquery-to-catch-and-display-aspnet-ajax-service-errors/

If you come across any tips, tricks, resources related to JQuery that you think would help other members please email them to Susan Fischer at susan@clinchportal.com and we will post them.

Wednesday, March 18, 2009

JQuery Tips For Beginners

A week or so ago, I really started to use JQuery on larger scale applications. Below are some of the things I ran in to. Hopefully this will help you in your JQuery projects.

  1. Say no to DataLists. The reason being that they wrap the div tags in unnecessary tables. Using a repeater instead produces cleaner code. Easier to debug your jquery
  2. No spaces un xslt attributes or elements
  3. Intellisense: http://blogs.ipona.com/james/archive/2009/01/14/jquery-1.3-and-visual-studio-2008-intellisense.aspx
  4. Use Firebug to watch expressions
  5. Do not put the minus sign in the id, name or class attributes as running an eval statement will fail. eg. the following will fail
    $('#' + form + ' input, #' + form + ' textarea').each(function(i) { eval("msg." + $(this).attr('name') + " = '" + $(this).val() + "';"); });
  6. Try to keep functionality separated into different .js files instead of grouping them all in one. It makes it easier to debug.
If you have any items to add to this list that will help new users of JQuery please email them to Susan Fischer at susan@clinchportal.com and we will post them here.

Welcome to JQuery Guild

Welcome to the JQuery Guild blog. This blog is designed to allow beginners and experts to share their tips and tricks with each other. If have any issues you need assistance with, or issues have solved, please email them to us at susan@clinchportal.com and we will post them here.