Quantcast
Viewing all articles
Browse latest Browse all 12134

Re: how to extract innerHTML value UP, from attached pic

in below code I am not getting Json responce value, what need to write in body tag in web_custom_request

 

web_reg_find("Text=UP ","Fail=Found","SaveCount=count11","Search=Body",LAST);

  web_custom_request("AxisServlet",
  "URL=<url>/proxy/pings.html",
  "Method=POST",
  "RecContentType=text/html",
  "Referer=<url>/proxy/pings.html",
  "Mode=HTML",
  "EncType=application/x-www-form-urlencoded; charset=utf-8",
  "Body=",
   LAST);

  lr_output_message("%d", atoi(lr_eval_string("{count11}")));

-------------------------------------------------

respoce is dynamic and coming from one js file : http://<url>/js/ping.js in html page

and this file have Json function below, this function have two values UP and DOWN dynamically populated everytime page load and this count of UP or DOWN I need in my output

 

Will you please tell in Body tag above what need to write from below function and what need to write in web_reg_find "Text=UP" tag so that after web_reg_find it take value from  it and search in body of web_custom_request

 

I googled one transformation on http://www.jds.net.au/tools/reformat/ which can convert Json function like below to web_custom_request but it is not working for my Json function

 

$(document).ready(function() {

	createPingsBoard("#pings");

});

function createPingsBoard(div) {

        $('#pings li').each( function() {
        		var comp = $(this);
        		var compName = comp.attr('id');
               
                $.getJSON( '/' + compName + '/mvc/fw/ping/index.json', {})
                                .done(function(data) {
                                	comp.append('UP <a href=\"/' + compName + '/mvc/fw/index.html">' + compName + '</a>');
                                }).always(function() {
                                        ;
                                }).fail(function(){
                                	//alert(compName + 'no ok');
                                	comp.append('DOWN <a href=\"/' + compName + '/index.html">' + compName + '</a>');
                                });
        });

};

Viewing all articles
Browse latest Browse all 12134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>