Monday, January 24, 2011

Jquery Checkbox on click - enable/disable Items

I have used this code to enable/disable textboxes in the onclick of a Checkbox

$('#by_cheque').click(function() {
if ($('#by_cheque').is(':checked')) {
$('#payable_name').removeAttr('disabled');
} else {
$('#payable_name').attr('disabled', 'disabled');
}
});

Tuesday, January 11, 2011

cartographer - Google map API v3 plugin in rails

Hi all,

For using Google map v3, i always used with Javascript v3 provided by google. I didn't know there is an awesome plugin like this. anyways its not late.. Here is the GIT repo for it.

https://github.com/parolkar/cartographer

Also anyone knows more about Google map API plugins pls share ..

Thursday, January 6, 2011

Refresh Page with Javascript

Hi I have used the following JS for page refresh automatically.


function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}

<body onload="JavaScript:timedRefresh(120000);">

// 12000 - 2 minutes
// 100 - 1 second

Registering your App in Facebook

1. Register your APP here http://developers.facebook.com/setup , for local use your local URL ex). http://localhost:3000/
2. Click Submit, and once registered it will take you to a page.
3. In that click on Developer Dashboard.
4. Check if your Site URL.
5. Copy your App credentials to your App yml file.

fb_api_key: {your api key}
fb_secret: {your fb secret}
fb_app_id: {your app id}

Tuesday, January 4, 2011

A super simple Facebook Open Graph API client

For Facebook Graph API client. I checked a gem 'rest-graph'

Here is the git repo https://github.com/godfat/rest-graph

Authentication with Facebook, Twitter, etc

Hi,

I have came across this gem authlogic-connect.

https://github.com/viatropos/authlogic-connect

This provides Authentication with twitter, facebook, google, yahoo, myspace, vimeo, linked_in