Subscribe to this list via RSS Blog posts tagged in JavaScript

Posted by on in Blogs
jqGrid and XSS Security Version 3.5.2 of jqGrid included an important new feature: Now when autoencode is set to true we encode the data coming from server and not only when we post it (secutity fix) Prior to this, you were required to encode the data yourself. Now personally, I think that should be the default. But it would have been a breaking change for the grid, since there are a few cases where you want to display unencoded data (I'll discuss these exceptional cases in a second). It's really easy to make t...
Using jqGrid with ASP.NET MVC: Search and Formatting This is the fourth post in a series on using jqGrid with ASP.NET MVC. Today, we're going to examine search and formatting results. I will implement a search feature and fix the problem with formatting date columns which I observed in the last post. I've updated the demo solution with these new features, and also fixed a bug reported by Andrey last time. If you're new to the series, you might want to start at the beginning. First, let's fix the date display. The reason the date appeared so odd...

Posted by on in Blogs
jQuery 1.3.1 Selector Bug and Workaround In jQuery 1.2.6, if you wanted to select all inputs with empty values, you could do this: var emptyInput = $("form input[value='']"); That's a little hard to read, so note that the quotes around the entire selector are double quotes, but the quotes inside the square brackets are two single quotes. This says, "Give me any input where the value is equal to empty string." This is broken in jQuery 1.3.1. Try it, and you will see (if you have a debugger attached): Syntax error, unrecognized exp...

Posted by on in Blogs
Customizing jQuery Validation While doing some bug fixing and cleanup in a web application, I had the chance to go a little deeper into the jQuery user input validation framework. There are many tutorials available about implementing custom validations. But what I wanted to do was to extend the default validations with my own code, while preserving the existing functionality, and to do it site-wide. So let's pretend that I'd like to extend the default "required" validation in such a way that you are not allowed to enter "...
PageRequestManagerServerErrorException in FireFox One of the problems we had to face when adding event support to CDN was the additional time it takes to check if there are any events scheduled in days displayed in the navigation calendar. To improve client-side performance, I used an UpdatePanel and a Timer to delay loading that information. The calendar is first rendered without highlighting days with events, but when the Timer's Tick event is triggered, the server searches for events in the specified time range and refreshes the calendar. A ...

Posted by on in Blogs
Introduction to Ajax In VCL for PHP, Ajax technology is handled in different ways (xajax and qooxdoo RPC), but it's encapsulated enough so you don't have to mess with javascript code. In any case, it's useful to know how it's working behind the scenes, here you can find a nice introduction: "AJAX (Asynchronous Javascript and XML) is like DHTML in that it is a combination of several existing technologies rather than being a single technology. In this case the technologies involved...
Tags: JavaScript
Eloquent JavaScript - An opinionated guide to programming As we stated in some previous posts, you need some javascript knowledge to fully leverage the power of VCL for PHP, so this resource can be useful to you: "Eloquent JavaScript is a digital book providing a comprehensive introduction (tutorial) to the JavaScript programming language. Apart from a bookful of text, it contains plenty of example programs, and an environment to try them out and play with them. " A book by Marijn Haverbeke you can find here: http://eloquentj...
Tags: JavaScript

Posted by on in Blogs
Returning multiple values in Javascript If you are a VCL for PHP user, it's nice you get some javascript knowledge because it will be useful from time to time, we have in the works a system to reduce the amount of javascript code you need to write. In the meantime, there are some javascript unique features that we would like to point, like returning multiple values from a function, check out the article: http://javascript.about.com/library/blmultir.htm...
Tags: JavaScript

Posted by on in Blogs
jQuery 1.2.2 jQuery team has released a new version, they have made some important changes and have improved speed, please, check out the announcement: http://jquery.com/blog/2008/01/15/jquery-122-2nd-birthday-present/...
Tags: JavaScript

Check out more tips and tricks in this development video: