Monday, December 31, 2012

HappyYear



Don't [Cubicles]  <http://www.smileycentral.com/?partner=ZSzeb001>  too hard but work smart.  May your boss appreciate you and say [Thumbs Up]    [Good Job]  <http://www.smileycentral.com/?partner=ZSzeb001> .
Take care of yourself [Dreaming]  <http://www.smileycentral.com/?partner=ZSzeb001> .    Pamper yourself and buy some beautiful [Shopping]  <http://www.smileycentral.com/?partner=ZSzeb001> [Wedding Dress]  <http://www.smileycentral.com/?partner=ZSzeb001> .
Don't worry coz   [Dollar]  <http://www.smileycentral.com/?partner=ZSzeb001>    will come from above.   May you also purchase  or change a [House]  <http://www.smileycentral.com/?partner=ZSzeb001>   and a [Car]  <http://www.smileycentral.com/?partner=ZSzeb001> . May the days ahead be busy but easy [Watching The Clock]  <http://www.smileycentral.com/?partner=ZSzeb001> ,     [Relax]  <http://www.smileycentral.com/?partner=ZSzeb001>   and  go [Cruising]  <http://www.smileycentral.com/?partner=ZSzeb001> [Pilot]  <http://www.smileycentral.com/?partner=ZSzeb001> around the world.   It's important to have good health,  therefore, eat more [Apple]  <http://www.smileycentral.com/?partner=ZSzeb001> [Broccoli]  <http://www.smileycentral.com/?partner=ZSzeb001> [Carrots]  <http://www.smileycentral.com/?partner=ZSzeb001>   and [Corn]  <http://www.smileycentral.com/?partner=ZSzeb001> , but not too much [Fat]  <http://www.smileycentral.com/?partner=ZSzeb001>   [Fat Guy]  <http://www.smileycentral.com/?partner=ZSzeb001> .   Do remember to [Tennis]  <http://www.smileycentral.com/?partner=ZSzeb001>  at least once a week.  My best wishes to you and all your [Family Portrait]  <http://www.smileycentral.com/?partner=ZSzeb001>   in the coming year 2013!

Sunday, November 18, 2012

basics of JSONP


what is it : It is JSON with some paddind
ex: JSON: {"name","sreenath"}
     JSONP: my({"name","sreenath"})
     in the above 'my ( )' is padding
Why[Usage]: To over come problem of same domain origin policy restriction of AJAX [ you cant make a AJAX call to different domain]. 

How it works:

Its all possible with one condition. < script > tag can access resources in different domain

1.You make request to cross domain resource using script tag passing call back function name.
    < script src="htt://mydomain.com/resource?callback=mycallbackfunc"/>
2. Make your server side code to return passed function with data.
     mycallbackfunc(JSON DATA) ex: mycallbackfunc({"name","sreenath"})
3. implement your call back funcion in your client side code
function   mycallbackfunc(data){
// write your logic here 
}

That is it you have done cross domain request.


Limitations:
1. You can not make POST request with this
2. server side code needs to be written to return JSONP data