NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Ajax_GET_POST_LOAD // @namespace http://tampermonkey.net/ // @version 0.1 // @description Ajax GET POST LOAD // @author You // @match http://uni4.xorbit.de/alliance.php // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js // @require http://localhost/local/javascript/functions/test__.js // @grant none // ==/UserScript== var parser = new DOMParser(); var p1; ajax_get('overview.php'); alert('p1: ' + p1); // $(p_alle).each( function(count) { console.info( count + '---> ' + this.value) }) function ajax_get(url) { window['jQ'] = $; var request = $.ajax({ url: url, method: "GET", dataType: "html" }); request.done(function(msg) { window['dom'] = parser.parseFromString(msg, 'text/html'); console.debug(msg); // console.info(dom.getElementById('met')); console.debug(dom.getElementById('pselector')); dom = dom.getElementById('pselector') window['p_alle'] = $(dom.children); $(dom.children).each(function(i_count) { window['p' + i_count] = this.value; console.debug(i_count + ': -> ' + this.value); }); }); } /* console.log('tampermonkey'); url_get = get('http://uni4.xorbit.de/overview.php'); alert('GM: _17: ' + ajax_get(url_get)); */ /* var parser = new DOMParser; var planeten; alert('start_alliance'); url_get = 'http://uni4.xorbit.de/overview.php'; console.debug('start'); var request = $.ajax({ url: "overview.php", method: "GET", dataType: "html" }); request.done(function( msg ) { dom = parser.parseFromString(msg, 'text/html'); console.debug( msg ); // console.info(dom.getElementById('met')); console.info(dom.getElementById('pselector')); a_planeten = dom.getElementById('pselector') window['a_planis'] = a_planeten; $(a_planeten.children).each( function(i_count) { console.info( i_count + ': -> ' + this.value ); }); }); request.fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); console.debug('fertig'); */