Milewski’s jQuery getScript

I find it hard to break from my work to post but I just had to rant about this.

Tom Milewski alternative jQuery getScript function is invaluable.
It replaces the normal jQuery getScript function with one that supports debugging and which references the script files as external resources rather than inline. This is a huge help when debugging in IE. Thanks Tom.

https://gist.github.com/896561

Disable Chrome in C# SharePoint Webparts

I continue to create a lot of custom webparts for SharePoint 2010.  I found a better way to automatically disable Chrome in your c# webpart class.

public override PartChromeType ChromeType
{
     get { return PartChromeType.None; }
     set { base.ChromeType = PartChromeType.None; }
}

I started using this method because in my advanced webparts where I use and EditorPart to handle webpart options; I hide all the other webpart options. To hide the default webpart options I use the following code.

base.Parent.Controls[2].Visible = false;

This is an update of an earlier post.

Formbuilder – Launched

The form builder takes basic data about your form and builds the XHTML, CSS, and Javascript need to deploy the form. It is really powerful and is a precursor to a few WordPress plugins.

The formbuilder employs a new jQuery cookie plugin (yet to be published) which is able to store objects and arrays in cookies not just strings of text.

The formbuilder has been deployed to formbuilder.scottreeddesign.com. Please try it out, load the demo forms and let me know what you think.

Regular Expressions

I have been getting better and better at using regular expressions in my C#, PHP, and JavaScript work.

I love the AIR version of this tool which helps you easily test your expressions.

I recently created this expression for a phone number search.

[0-9]{10}|[^0-9]{1}[0-9]{3}[^0-9]{1,3}?[0-9]{3}[^0-9]{1,3}?[0-9]{4}

It first looks for a string of 10 numbers or it looks for groups of numbers separated by non-numbers totaling 10 numbers.

jSuggest – New jQuery Plugin

In preparation for a massive site I am preparing for I wanted to find a simple jQuery plugin that did search suggestions. Everything I found was way to complicated and lacked server side support. With that in mind I made jSuggest, a lightweight jQuery plugin that helps you make suggestions for your text inputs. With only 3 KB in size it is very flexible and highly customizable.

The plugin site for jSuggest was made in the gMap and gSearch traditional view.