changed simple ajax get request to JSONP request. This way no header is needed.

This commit is contained in:
Fabian Faessler 2013-09-28 14:34:37 +02:00
parent 62baa5f6a8
commit b23eedc363

View File

@ -5,8 +5,7 @@
<script>
getIp = function(protocol) {
$.get("http://www.ip"+protocol+".nsupdate.info/myip", function(raw_data){
json_data = JSON.parse(raw_data)
$.getJSON('http://www.ip'+protocol+'.nsupdate.info/myip?callback=?','',function(json_data){
$(".ip"+protocol+"adr").val(json_data.ip);
}).fail(function() {
$(".ip"+protocol+"adr").val("no ip"+protocol+" address found");