PayPal API and .NET 2.0 compatibility fix

PayPal .NET 2.0The sample API code provided by PayPal has not been updated in some time. When it comes to recent versions of Microsoft’s .NET platform, not only is PayPal missing some DLLs needed to use it ‘out of the box’, the sample functions are actually wrong!

We discovered the problem while working on a custom built .NET web application for the Council of Public Relations Firms that includes integrated eCommerce. Thankfully, with some sleuthing and tinkering, we were able to update the necessary DLLs and correct the functions.

Continue reading PayPal API and .NET 2.0 compatibility fix

JavaScript Tutorial: Hooking Events at Runtime with Parameter Functions

Although there’s a lack of good documentation, adding a function that takes parameters (i.e. Function_Name(Parameter)) to one of JavaScript’s standard ‘On’ events (i.e. ‘OnClick‘ or ‘onKeyDown‘) is relatively simple for JavaScript coders. Advanced programmers might refer to this as dynamic runtime event assignment with functions using parameters passed.

Confused? Here’s a practical example.

Let’s say we have a text area field on a web page, and we want to execute some function every time they make a keystroke inside that field. In our real world example, we wanted to count the number of characters, so we could let the user know how close they were to the limit, and warn them when they exceed the limit. To capture keystrokes, we need to hook into JavaScript’s ‘onKeyUp and ‘onKeyDown‘ events.

Continue reading JavaScript Tutorial: Hooking Events at Runtime with Parameter Functions