Login   Register  
Icontem

File: sample.html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Juraj Puchký  >  HTTP Client  >  sample.html  >  Download  
File: sample.html
Role: Example script
Content type: text/plain
Description: sample file
Class: HTTP Client
Send HTTP requests to given Web servers
Author: By
Last change: Fixed comment
Date: 2012-10-24 13:31
Size: 3,633 bytes
 

Contents

Class file image Download
<!--
 Java Script HTTP Client Sample HTML
 @Description HTTP Client GET, POST supported
 and following versions of XMLHttpRequest
 MSXML2.XMLHTTP.6.0,
 MSXML2.XMLHTTP.5.0,
 MSXML2.XMLHTTP.4.0,
 MSXML2.XMLHTTP.3.0,
 MSXML2.XMLHTTP.2.0,
 MSXML2.XMLHTTP,                
 Microsoft.XMLHTTP
 @File sample.html
 @Autor Juraj Puchký - Devtech <sjurajpuchky@seznam.cz>
 @Home http://www.devtech.cz, https://sourceforge.net/p/jshttpclient
 @SVN  svn checkout svn://svn.code.sf.net/p/jshttpclient/code/trunk jshttpclient
 @Donation 2$ over there -> https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F7LQTUFF5WCXL  then i can give more time to improove code.
 @Version 1.0.0
 @Created 9.10.2012
 @Licence GPLv3 or later AND Disabled persons license as lex specialis
-->
<!DOCTYPE html>
<html>
    <head>
        <title>Sample of usage JSHTTPClient</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="jshttpclient.js"></script>
        <script type="text/javascript">
            var httpClient = new HTTPClient();

            function CustomHTTPHandler() {

                this.onInitializing = function() {

                };

                this.onError = function(status, statusText) {

                };

                this.onProgress = function(responseText, contentLength) {

                };

                this.onFinally = function(result) {
                    c = document.getElementById("main");
                    c.innerHTML = result;
                };
            }


            httpClient.customHTTPHandler = new CustomHTTPHandler();

            function init() {
                httpClient.get("<!-- ENTER YOUR URL HERE -->");
                httpClient.next();
            }
        </script>              
    </head>
    <body onload="init();">
        <H1>Sample of usage Java Script HTTP Client</H1>
        Distributed under GPLv3 licence any time you wish you can donate only 2$ to this project, then i can give more time to improove the code.

        Any questions or needs, just ask me.

        <p>
            This object can send HTTP requests to given Web servers.
            It can queue HTTP requests to be sent to remote servers given the URLs.
            The object can handle one request at time fetching the next URL on the queue.
            The requests can be sent via HTTP GET or POST methods using XMLHttpRequest objects or equivalent on each browser.
            An handler object can be registered to handle different types of events like initailization, errors, progress and completion.
            supported
            XMLHttpRequest
            MSXML2.XMLHTTP.6.0,
            MSXML2.XMLHTTP.5.0,
            MSXML2.XMLHTTP.4.0,
            MSXML2.XMLHTTP.3.0,
            MSXML2.XMLHTTP.2.0,
            MSXML2.XMLHTTP,
            Microsoft.XMLHTTP
        </p>

        <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
            <input type="hidden" name="cmd" value="_s-xclick">
            <input type="hidden" name="hosted_button_id" value="F7LQTUFF5WCXL">
            <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
            <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
        </form>
        <h2>Data</h2>
        <div id="main">
        </div>                 
    </body>
</html>