I have written a client app based on HttpClient.

I need to simulate the following AJAX/JavaScript function.

Basically, after a simple GET request, I need to wait around until the
server signals that my request has been completed.



        function getCableInfo() {

                var url = 
"/testboard/DSL/GetCableInformation.pl?random=7.10653400122286"
                var doc;
        
                if (window.ActiveXObject) {
                        try {
                                doc = new ActiveXObject("Microsoft.XMLHTTP");
                        }
                        catch(e) {
                                document.getElementById('nojs').submit();
                        }
                }
                else if (window.XMLHttpRequest) {
                        try {
                                doc = new XMLHttpRequest();
                        }
                        catch(e) {
                                document.getElementById('nojs').submit();
                        }
                }

                doc.open("GET", url, true);
                doc.setRequestHeader( "Content-Type" , 
"application/x-www-form-urlencoded;
charset=UTF-8" );
                doc.send("");

                doc.onreadystatechange=function() {
                        if (doc.readyState==4) {
                                document.getElementById('cableInfo').innerHTML 
= doc.responseText;
                        }
                }
        }
-- 
View this message in context: 
http://old.nabble.com/HttpClient-AJAX-Client-tp26473409p26473409.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to