When accessing the page through the browser http://192.168.0.1/conninfo.php
(this is a router), it issues
var result = new Array("OK", "connected", "192.112.240.26", "255.255.255.255", "172.16.1.2", "194.28.28.3 8.8.8.8", "");
Tell me how to do it so that if it says "connected", for example, it will execute
Label1.Caption:= 'трололо';
and the rest, where there are IP addresses, recorded in various Label, just do not care what action will take place, it is important for me to understand how to remove the information from the page and fulfill the condition, in this case I understand very little, so please explain in more detail, but rather ready script or example, I digress. Here is another found javascript on the page, mb will help somehow, I don’t browse it
switch (result[0]) { case "OK": if (result[1] == "connected") { result[4] = result[2]; get_obj("connstate").value = "Подключен"; get_obj("wanipaddr").innerHTML = " " + result[2]; get_obj("wansubnet").innerHTML = " " + result[3]; get_obj("wangateway").innerHTML = " " + result[4]; get_obj("wandns").innerHTML = " " + result[5]; get_obj("bt_connect").disabled = false; } else { get_obj("connstate").value = "Отключен"; get_obj("wanipaddr").innerHTML = " 0.0.0.0"; get_obj("wansubnet").innerHTML = " 0.0.0.0"; get_obj("wangateway").innerHTML = " 0.0.0.0"; get_obj("wandns").innerHTML = " 194.28.28.3 8.8.8.8"; get_obj("bt_connect").disabled = false; } setTimeout("update_state()", period); break; case "WAIT": setTimeout("update_state()", period); break; } delete result;