Monday, December 31, 2012


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

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