File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -109,13 +109,10 @@ Here is a sample code to use IP Geolocation API using JQuery SDK:
109109 var country_code2 = sessionStorage .getItem (" country_code2" );
110110
111111 if (! ip || ! country_name || ! country_code2) {
112+ setAsyncParameter (false );
112113 setFieldsParameter (" country_name,country_code2" );
113114 getGeolocation (handleGeolocationResponse, " YOUR_API_KEY" );
114115 }
115-
116- $ (document ).ready (function () {
117- alert (" Hello " + country_name + " !" );
118- });
119116
120117 function handleGeolocationResponse (json ) {
121118 ip = json .ip ;
@@ -126,5 +123,9 @@ Here is a sample code to use IP Geolocation API using JQuery SDK:
126123 sessionStorage .setItem (" country_name" , country_name);
127124 sessionStorage .setItem (" country_code2" , country_code2);
128125 }
126+
127+ $ (document ).ready (function () {
128+ alert (" Hello " + country_name + " !" );
129+ });
129130< / script>
130131```
You can’t perform that action at this time.
0 commit comments