what http error code to use for validation error

Feb 18, 2011

I was using 500 - Internal Server Error for validation errors, but problem was the application error handler caught this and shows generic error page, which causes validation logic to fail. So instead we can use

Either use code 400 - Bad Request or code 200 - with the error message

http://stackoverflow.com/questions/362618/proper-use-of-http-status-codes-in-a-validation-server

Categories : JavaScript   HTTP

jQuery validation plugin , validate only visible fields

Feb 17, 2011

Refer this Stack overflow post for the solution

http://stackoverflow.com/questions/1802177/jquery-validation-only-for-visible-controls

Pasting code from the post below

$("#registerform").validate({ignore:":not(:visible)"});
Categories : jQuery   JavaScript

qTip - Excellent jQuery Tooltip plugin

Feb 15, 2011

If you are looking for a jQuery tooltip plugin to use for your project, http://craigsworks.com/projects/qtip/ is the right one for you.

It gives full flexibility in customizing the appearance and the behavior. Also the default settings are good, so with just couple of lines, you can put this plugin to real use in your project.

Another important aspect is its working fine in both IE8, Firefox and Chrome. The tooltip shows with rounded borders in all the browsers, and its achieving the rounded borders without images, which is cool.

Categories : jQuery   JavaScript

Git GUI checkout single file command

Jan 31, 2011

To checkout a single file using Git GUI, go to the Tools menu and add the following command

git checkout $REVISION – $FILENAME Now select the file to checkout and run the command .

See Stack overflow post about this here - http://stackoverflow.com/questions/1507300/git-checkout-revision-of-a-file-in-git-gui

Categories : Git

Difference between Div and Span tag

Jan 27, 2011

Good article in the link below about this

http://webdesign.about.com/od/htmltags/a/aa011000a.htm

Simple point to keep the difference in your mind is Div tag adds new line , Span tag does not

Categories : HTML