jquery json doesn't return any value /repsonse -


i'm using getjson json value returned page, there no response function..

<html> <head>     <script type="text/javascript" src="jquery.js"></script>     <script type="text/javascript">         alert ("dfdfad");         function sam()         {             alert("entere");             $.getjson(                 'https://test.httpapi.com/api/domains/available.json?',                 {                     'auth-userid':'234343',                     'auth-password':'xxxxxxxx',                     'domain-name':'yyyyy',                     'tlds':'com',                     'tlds':'info',                     'suggest-alternative':'true'                 },                 function(json,textstatus,xhr) {                     alert ("inside fun");                     alert("json data: " + json);                 }             );             alert("finish");         }     </script> </head> <body>  <div>     <h2>let ajax change text</h2> </div> <button onclick=sam();>change content</button> </body> </html> 

when used following url browser returns value json..

the following url may not work other ip because needs registration of ip response.. i'm sure ip registered , working

https://test.httpapi.com/api/domains/available.json?auth-userid=2343432&auth-password=xxxxxx&domain-name=testhiox&tlds=com&tlds=info&tlds=org&suggest-alternative=true  

what may issue?

you use fiddler check http response request is. attempted using code below, got 504 - connection failed error.

<html> <head>     <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>     <script type="text/javascript">         var samns = samns || {};          $(function () {             alert ("dfdfad");             samns.sam = function ()             {                 alert("entere");                 $.getjson(                     'https://test.httpapi.com/api/domains/available.json',                     {                         'auth-userid':'232323',                         'auth-password':'xxxx',                         'domain-name':'yyyy',                         'tlds':'com',                         'tlds':'info',                         'suggest-alternative':'true'                     },                     function(json, textstatus, xhr) {                         alert ("inside fun");                         alert("json data: " + json);                     }                 );                  alert("finish");             }         });      </script> </head> <body>  <div>     <h2>let ajax change text</h2> </div> <button onclick="samns.sam();">change content</button> </body> </html> 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -