JavaScript: Attaching/Detaching Event, OnLoad vs. DOMContentLoaded, Manipulating DOM and CSS

Event Handling, Attaching and Detaching Events 3 phases of event dispatch: Capturing – going down the DOM tree until it reaches the target element Target Bubbling – going back up the DOM tree from the target element   // standard way of accessing the Event objectvar eventHandlerDOM = function(evt) { alert(evt.type); //displays click} // starting …

Continue reading JavaScript: Attaching/Detaching Event, OnLoad vs. DOMContentLoaded, Manipulating DOM and CSS

Advertisements

JavaScript: RegExp, Error, DOM, and Event

This post is a follow-up to my previous posts, Object Oriented Programming In Javascript and JavaScript Array and How It’s Different from Object.  In this post I will touch on regular expressions, error handling, basic DOM scripting, image preloading, and timing events.   Regular Expressions // creating patternsvar pattern1 = new RegExp("Rodan"); // using constructorvar …

Continue reading JavaScript: RegExp, Error, DOM, and Event

.NET: Regular Expression Testers and Quick Reference Guides

I talked briefly about regular expressions in .NET Framework here, how you can test for a match and how to extract or replace a matched group, or matched substring if you may.  The examples there used a named group to extract a matched group (e.g. ?<proto>, ?<port>, etc...).  It's worth mentioning that you can also extract a …

Continue reading .NET: Regular Expression Testers and Quick Reference Guides