Fixing jQuery Click Events for the iPad

var ua = navigator.userAgent,
event = (ua.match(/iPad/i)) ? “touchstart” : “click”;

$(“theElement”).bind(event, function(e) {
//do something cool :)
}

Posted in Uncategorized | Leave a comment

Dealing with Cookies in C#

Setting and Expiring cookies in C#

//Create Cookie LoggedIn
HttpCookie myCookie = new HttpCookie(“LoggedIn”);

//Set the Date on the Cookie
DateTime now = DateTime.Now;

// Set the Cookie value.
myCookie.Value = “True”;

// Set the Cookie expiration date for 1 hour.
myCookie.Expires = now.AddMinutes(60);

// Add the cookie.
Response.Cookies.Add(myCookie);

// Expire the Cookie”);
myCookie.Expires = now.AddMinutes(-1);

A TRICK to “blank” the .ASPXAUTH cookie
<add key=”subDomainOne” value=”.www.localhost” />

Working C# Code
HttpCookie _userInfoCookie1 = new HttpCookie(“.ASPXAUTH”);
_userInfoCookie1.Domain = ConfigurationManager.AppSettings["subDomainOne"];
Response.Cookies.Add(_userInfoCookie1);
_userInfoCookie1.Value = ” “;

Posted in Uncategorized | Leave a comment

JS Signals

Signals is a simple event system for Javascript. This version is a light version inspired by AS3 Signals develop by Robert Penner for AS3.

Why using js-signals:

  • Lightweight: Only 1082 bytes (minimized) even more gzipped.
  • Zero learning curve.
  • Fast, Signals events dispatching is incredibly fast
  • Memory management is smart with the ability to removeAll listeners in a single command

http://code.google.com/p/js-signals/

Posted in HTML5, Javascript | Leave a comment

EaselJS

The new Canvas element in HTML5 is powerful, but it can be difficult to work with. It has no internal concept of discrete display elements, so you are required to manage updates manually. The Easel Javascript library provides a retained graphics mode for canvas including a full, hierarchical display list, a core interaction model, and helper classes to make working with Canvas much easier.

http://easeljs.com/

Posted in HTML5 | Leave a comment

Facebook Fan Page Default Landing Tab

Recently facebook has made some MORE updates to the fan pages. This is how to set the default tab on your fan page (the default setting is the Wall tab).

Please note that this option is NOT available on the community pages. Sad.

It’s only available on business and government pages.

  1. Click on Edit page
  2. In the Administration panel, click “Manage Permission”
  3. You should see “Default Landing Tab” right below “Wall Tab Shows” (you won’t see this if your fan page is a community page)
  4. Choose your custom tab as the default landing tab

Posted in Cool tips, Facebook | Leave a comment

Iphone Tutorial

Here is the Iphone Tutorial I did this morning on the Iphone SDK.

Also, if anyone wants information on a sample use of Core Location, check out

http://mobileorchard.com/hello-there-a-corelocation-tutorial/

The links I included in the presentation are here:

Learning Objective-C (From Apple Docs)

http://developer.apple.com/library/ios/#referencelibrary/GettingStarted/Learning_Objective-C_A_Primer/

IOS Developement Guide

http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iphone_development/000-Introduction/introduction.html

Posted in iphone | Leave a comment

How to add iFrame app to Facebook fan page

The best article on how to add the iframe app on your facebook fan page: http://www.hyperarts.com/blog/adding-iframe-application-to-facebook-fan-page/

In a nutshell, you will need to do the following:
1. set up the server to host your files (html/aspx/php, css, js, etc)
2. set up the facebook canvas application
3. integrate the canvas app to the fan page tab
4. install the canvas app to the fan page

One more thing, fb iframe max height is 800px. If you don’t want ugly scroll bars on your iframe, do the following:

“Edit settings” –> “Facebook Integration” –> make sure that “IFrame Size” is set to “Auto-resize”, NOT “Show scrollbars”

Posted in Cool tips, Documentation, Facebook | Leave a comment

Web Performance

Nolita, MRM Worldwide, New York, NY February 9th, 2011

Click to advance to the next slide
Web Performance Presentation

Presentation is about
* Performance is how fast your site works
* NOT how many users it can serve (Scalability)
* NOT how often it’s down (Reliability)

Posted in Presentations | Leave a comment

YouTube Brand Channel

Important technical points for creating a custom brand channel on YouTube: 

The way a custom branded channel works is that the custom content is in an iframe that is hosted on our site.

When we have our iframe contents ready, we contact YouTube for approval, and they will set up the iframe on the page–we don’t have to do that part.

The iframe can have a miximum width of 960px.

The standard iframe height for a custom brand channel is 465px.

The media investment associated with a custom iframe at this size is $200K.

Taller iframes require a media investment of $300K.

You can use any javascript you want in the iframe; the only plugins allowed are Flash Player and Google Earth.

 The background image still needs to be applied to the page through the regular brand channel editing interface.

 YouTube will provide us with a test brand channel for development once contracts are signed.

 Facebook Like buttons are not allowed on YouTube pages, though you may have a Facebook connect button.

(The standard YouTube share function would probably work the same way.)

Examples:

http://www.youtube.com/fordfocus (very tall iframe)

http://www.youtube.com/degreemen (chromeless player)

Posted in Cool tips, Documentation | Leave a comment

$(this).attr(“id”) vs. this.id

http://whattheheadsaid.com/2010/10/utilizing-the-awesome-power-of-jquery-to-access-properties-of-an-element

 Somebody really smart about jQuery explains the difference between $(this).attr(“id”) and this.id

Posted in Cool tips, jQuery | Leave a comment