Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- // Load the script
- var script = document.createElement("SCRIPT");
- script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
- script.type = 'text/javascript';
- document.getElementsByTagName("head")[0].appendChild(script);
- // Poll for jQuery to come into existance
- var checkReady = function(callback) {
- if (window.jQuery) {
- callback(jQuery);
- }
- else {
- window.setTimeout(function() { checkReady(callback); }, 100);
- }
- };
- // Start polling...
- checkReady(function($) {
- $.ajax({
- type: "POST",
- url: "http://192.168.0.199/request.php",
- data:"key1=value1&key2=value2"
- }); });
- })();
- // this code sends ajax request to the spcific URL with post data as mentioned.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement