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..
- <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':'testhiox',
- 'tlds':'com',
- 'tlds':'info',
- 'suggest-alternative':'true'
- },
- function(json,textStatus,xhr) {
- alert ("inside the fun");
- alert("JSON Data: " + json);
- });
- alert("finish");
- }
- </script>
- </head>
- <body>
-
- <div><h2>Let AJAX change this text</h2></div>
- <button onclick=sam();>Change Content</button>
- </body>
- </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
- 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?