Tips and Tricks Articles

Browser version detection in Javascript

Browser version detection in Javascript var ns4 = (navigator.appName.indexOf("Netscape")>=0 &&            parseFloat(navigator.appVersion) >= 4 &&   

Paul Hayman - 2,786 views

Geting the position of the mouse pointer (cursor) in JavaScript (Works in IE7)

Geting the position of the mouse pointer in JavaScript (Works in IE7) The following function will return the position of the mouse pointer based on the event. It actually works in IE7. function getPosition(e) {     e&nb

Paul Hayman - 17,763 views

Get the Top and Left location of an element with JavaScript

The following code will return the top and left position for an element. var ns4 = (navigator.appName.indexOf("Netscape")>=0            &&&nbs

Paul Hayman - 6,233 views

Set Input Focus on a Control Programatically Added to an ASP.Net Page

Set Input Focus on a Control Programatically Added to an ASP.Net Page This little problem had the potential to drive me nuts for hours, I was fortunate to stumble over a blog with 100s of comments re problems of this nature and how to solve it. Most of the discussion was about using JavaScr

Paul Marshall - 3,754 views

Custom Validators using Client Side JavaScript

Custom Validators using Client Side JavaScript In my latest project I am really enjoying using the Ajax Control Toolkit, particularly the ModalPopupExtender. I've been using the popup panels to capture data, but I needed to validate the data that a user enters into certain fields. ASP

Paul Marshall - 50,913 views

Firefox doesn't use parentElement, it uses parentNode

Firefox doesn't use parentElement, it uses parentNode JavaScript in FireFox doesn't support the function parentElement. You should use parentNode instead. Example: myElement.parentNode;

Paul Hayman - 9,391 views

Activating flash automatically with javascript

Activating flash automatically with javascript I find it really annoying when you go to a website and you have a flash movie or flash navigation and you have to click on the flash to activate it before you can start interacting with it. With a little bit of javascript you can automatically a

Andrew Clark - 2,419 views

Image reflection the easy way!

Image reflection the easy way! After seeing the nice new reflection effects in some wpf/e examples from Microsoft and other sites that use reflection in their logo. I wanted to start using them on images in my sites. I started by opening photoshop and making the reflection part of the image,

Andrew Clark - 8,934 views

Web service calls from javascript using ATLAS (part 3) - Complex properties

Web service calls from javascript using ATLAS (part 3) - Complex properties Part two covered returning objects with multiple properties from a webservice and accessing those properties from javascript. This article demonstrates that even 'complex' properties are supported by the ATLAS

Dave Howard - 5,346 views

Web service calls from javascript using ATLAS (part 1)

Web service calls from javascript using ATLAS (part 1) ATLAS provides a fantastic mechanism for making web service calls from javascript code. Take the simple web service below... public class myWebService : System.Web.Services.WebServic

Dave Howard - 5,945 views

Not using Google Analytics? You should be!

Not using Google Analytics? You should be! Over the past few days I have received a number of comments regarding a recent article I published about re-directing a Page by Appending an HTTP Header, and linking this with Google's Analytics PPC tracking for Affiliate click-throughs. Read it he

Paul Marshall - 8,654 views

TAB inside input boxes

TAB inside input boxes When you want to insert a TAB character inside a textarea (or a textbox) in a web page, you press TAB key and the focus moves to another field in the page instead of a TAB character being inserted into the textarea. The problem is that TAB key is reserved for web pages

Barrington Haynes - 18,348 views