Seamless Solutions, Tailored Integration info@wkintegrations.com Kendal, Cumbria, UK

Archive

Posts from 2008

13 posts.

Launch the Debugger Automatically

The following is taken directly from msdn : How to: Launch the Debugger Automatically Sometimes, you may need to debug the startup code for an application that is launched by…

Cross Browser Support for DOM Events

Firefox follows the DOM standard and passes an event object to each event listener, however has the global event: windows.event. Problem: I wanted to fire a piece of javascript after…

Multiline TextBox Maximum Character Validation

Maximum character validation on asp.net TextBox controls do not work, therefore a RegularExpressionValidator has to be used to make sure the maximum number of characters are not exceeded e.g. <asp:TextBox…

Examples of Regular Expressions

Trim string in JavaScript var trimre='^s+|s+$'; // replace whitespace var trimmedstring = string.replace(trimre,""); Check for a valid date format in JavaScript var re='^(d{1,2})/(d{1,2})/(d{4})$'; // dd/mm/yyyy if (!datestring.match(re)) { alert("Date" +…

Creating a Banned Words Filter

I have a website with a user forum and content management system, where certain users (or anyone in the case of forums) can post to. I therefore had to create…

Insert JavaScript before PostBack Event

To call some javascript before the postback event is raised, use the following code: if (!Page.ClientScript.IsOnSubmitStatementRegistered(type, "script_onsubmit_editor_" + ClientID)) { string popTextareaScript = "var ed = YAHOO.widget.EditorInfo.getEditorById('" + editor.ClientID +…

Debugging JavaScript with Visual Studio.net

The following piece of advice was taken from a blog ( click here to see original ) discovered while I was searching for a solution to debugging JavaScript in Visual…

Styling Buttons in IE

Even though the button had a class specified on it to change the background image, in IE7 this did not style the button (but in Firefox the styling was picked…

Ordered/Unordered Lists Not Displaying in IE

In Firefox my unordered list would display automatically indented with the bullet points displayed (which I now believe to be incorrect) e.g. In IE the list would be left adjusted…