Tag Archives: javascript

Understanding Callbacks 01May, 2015

Understanding Callbacks

I am back with a complicated yet very interesting article on “Callbacks”. First of all, why do we need callbacks? Our javascript is synchronous in its behavior. It works only on a single thread. Each statement executes when the earlier statement is executed. Now the case arise, if one statement takes more time to execute, then the next statement will be halted. For example: 1. console.log(“1”); 2. var result = 0; 3. for(var i=0; i<=100000; i++){ result += i; } 4. console.log(‘3′); So till the time loop doesn’t execute for 100000 statements, it will not execute the 4th statement. But in case we have some event like a ajax call, a file read operation or any other activity than a…

Posted in: JavaScript
Google MAP JavaScript V3 02Dec, 2013

Google MAP JavaScript V3

Through this post, I am going to share with you “How to apply Google MAP JavaScript V3” with country and city auto-suggest option, and return latitude and longitude. We can select location with the marker also and when user move marker then it returns address, latitude and longitude automatically. This is the official Google Map site: Here you can find more tutorials related to Google Maps and their usage. To apply Google MAP V3, follow the steps given below: Step 1: Create Google_map.html and include the basic jQuery library. Here you can find the basic jQuery library: Step 2:Include the basic jQuery UI library. Here you can find the basic jQuery UI library: Step 3: Create Google…

Posted in: API