getJSON doesn't return any value/response!!!

getJSON doesn't return any value/response!!!

Hi

I'm using the getJSON to get the json value to be returned by a page,
but there is no response from the function..

  1.     <html>
  2.     <head>
  3.     <script type="text/javascript" src="jquery.js"></script>
  4.     <script type="text/javascript">
  5.         alert ("dfdfad");
  6.           function sam()
  7.         {
  8.         alert("entere");
  9.           $.getJSON('https://test.httpapi.com/api/domains/available.json?',
  10.         {'auth-userid':'234343',
  11.          'auth-password':'xxxxxxxx',
  12.            'domain-name':'testhiox',
  13.          'tlds':'com',
  14.          'tlds':'info',
  15.          'suggest-alternative':'true'
  16.         },
  17.         function(json,textStatus,xhr) {
  18.         alert ("inside the fun");
  19.           alert("JSON Data: " + json);
  20.         });
  21.         alert("finish");
  22.         }
  23.     </script>
  24.     </head>
  25.     <body>
  26.    
  27.     <div><h2>Let AJAX change this text</h2></div>
  28.     <button onclick=sam();>Change Content</button>
  29.     </body>
  30.     </html>

When i used the following url from the browser it returns the value exactly as json..

The following url may not work from other ip because it needs a registration of ip to get response.. I'm sure that my ip is registered and its working


  1.     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 be the issue?