|
|
0 comm |
PROBLEM
In the midst of continued development on my jHistory plugin for jQuery [ blog post - google code page - plugin page ] there was a very persistent bug with Internet Explorer - once you reload the page, the browser’s history is lost. This is only an issue with dynamic pages yet works with static (aka flat file, .html, .html, etc.) pages.
SOLUTION
Internet Explorer requires a 304 Not Modified request response on the first level page for the browser history to be retained upon reload.
|
|
|
0 comm |
Here’s a PowerShell function that you can use to make those numerous SVN STAT and SVN UP commands you run every day via the PowerShell CLI a little easier to read…
|
|
|
4 comm |
PROBLEM
Javascript is not capable of sorting Array’s that contain strings and numeric values as human readable.
Here’s a naturalSort() function in 11 lines of Javascript code that is faster than other javascript implementations to be able to sort as follows:
["$10002.00","$10001.00",10000].sort(naturalSort)
[10000, "$10001.00", "$10002.00"]
["1 Title - The Big Lebowski","1 Title - Gattaca","1 Title - Last Picture Show"].sort(naturalSort)
["1 Title - Gattaca", "1 Title - Last Picture Show", "1 Title - The Big Lebowski"]
|
|
|
22 comm |
GOAL
Animated scrolling of pagination on a datagrid aka datatable. Support ascending and descending “natural sorting” for columns. Support attachment to generic pre-built tables from conventional HTML and/or template driven HTML tables.
SCREENSHOT

|
|
|
0 comm |
PROBLEM
You had a 5 developer team, a single development box serving each developer’s sandbox and each SVN/CVS module with its own development hostname. The crux being that you’ll have to put in an individual VirtualHost declaration for every combination of developer and developer SVN/CVS module that has a unique hostname.
Here’s a quick way to use rewrite rules to make this easier for your classic lazy administrator:
RewriteEngine on
RewriteCond %{HTTP_HOST} (.*)\.dev\.company\.com:(.*) [NC]
RewriteRule ^(.*)$ /%2/%1/$1 [QSA,L]
|
|
|
5 comm |
Missing from the default jQuery 1.2.6 effects and the 1.5 jQuery UI is the ability to animate on the clip style property. Here’s a simple jQuery 1.2.6 “plugin” to extend the animate function to support animation of the clip property.
When you want to instantiate the animation, it’s as simple as:
$(‘.testImg’).stop().animate({‘clip’:‘rect(100px 300px 225px 75px)’})
|
|
|
37 comm |
GOAL
To have a simply, fast and elegant way to validate form fields with attractive alerts presented to the user with the following attributes:
- Check validity of field values within a certain container or block element based off simple INPUT tag attributes
- Easy configuration of validity checks per field as per attributes in the INPUT tag
- Check the validity of all fields within a certain container with a single function call
- Check the validity of a single field when the user clicks away firing the onBlur event
- Prevent the user to input specific characters into the field and notify them it’s not allowed
SCREENSHOT “POD” LAYOUT

|
|
|
3 comm |
GOAL
To support the ASP.NET’s DateTime JSON serialization in jQuery’s ajax() method. ASP.NET serializes the DateTime response as “\/Date(-19312300000)\/” and we want jQuery to automatically parse that as a native Javascript Date() object. This outlines the simplest approach to creating an ASP.NET web service in C#. This also shows an example of a Hashtable being returned by the ASP.NET webservice.
When using jQuery.ajax() to invoke an ASP.NET WebMethod decorated public function via native JSON encapsulation - we want to convert the JSON response from the WebMethod from:
{"datetime":"\/Date(-62135568000000)\/","arg1":"yarr"}to to the more Javascript Date() friendly:{"datetime":Date(-62135568000000),"arg1":"yarr"}
|
|
|
0 comm |
GOAL
To build a robust and fast AJAX handler facility utilizing Reflection to access remote methods in classes without using ASP.NET’s AJAX library and the [ScriptService] decorator and work with jQuery’s $.ajax() or $.post() facilities.
|
|
|
0 comm |
GOAL
Dynamic SQL command generation with proper use of sql parameterization to protect against sql injection and mal-formated queries.
The solution involves sending in a dynamic key->value list as a single JSON serialized string argument to dynamically build either an INSERT or UPDATE sqlCommand with parameterization.
|
|
|