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

Tag

javascript

5 posts tagged “javascript”.

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…

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" +…

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…