Only one HTML page receiving Ajax updates in Xprotect smart client view.

I added two web pages to a view which display some gauges I created in Javascript. These gauges are updated real-time using Ajax. In setup mode, both pages update as they should and it works great. As soon as you leave setup mode, only one page gets updated while the other remains static. If I click the home-button on one of the pages, the live data is then directed to the other page. If I click it again, the live data comes back to the one I clicked the home-button on.

Very odd. Is there a fix for this?

Cheers,

Bruce

Where are we?

Is this a Mobile Server integration using Ajax (Topic = Mobile Server)?

Is this a web page you load in the Smart Client HTMLPage type view?

Other?

It’s two web-pages that I’ve added to a Xprotect Smart Client 2017 R3 view.

Here’s video of me adding the page in setup mode. You’ll see that both pages go live after a few seconds. Then, I exit setup mode and you’ll see the pages load but only one page goes “live”. I switch back to setup mode and both pages update again.

https://www.youtube.com/watch?v=liVwnF9I7fA

Hi Bo,

Just wondering if there is any update on this issue? I’ve attached a shot of the operator using a view with just one web-page (bottom-right). That works well but would like to show more than one page.

Cheers!

I am sorry to keep you waiting. I have with Milestone Development arranged for an investigation of this. I cannot promise a quick response but can promise that there will be feedback after the investigation.

The investigation was short because the developer could not reproduce the issue. Can you supply the javascript / page content so that we can try to reproduce with the same as you work with?

This page only works within our internal network but here you go.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="HeadrigGauge.aspx.vb" Inherits="MES_Dashboard_HeadrigGauge" %>
 
 
<!DOCTYPE html>
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Production Chart</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" />
    <!-- 
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
    -->
    <style>
        body {
            background-color: black;
            overflow: hidden;
        }
 
        @media (min-width: 1200px) {
            .container {
                max-width: 1820px;
            }
 
            .smallprojection {
                display: none;
            }
 
            .bigprojection {
                visibility: visible;
            }
 
            .productionchart {
                min-height: 600px;
            }
        }
 
        @media only screen and (max-width: 1000px) {
            .chart {
                width: 100px;
                height: 100px;
            }
 
            .smallprojection {
                visibility: visible;
                font-size: .5em;
            }
 
            .productionchart {
                min-height: 250px;
            }
 
            .bigprojection {
                display: none;
            }
        }
    </style>
 
</head>
 
<body>
    <form id="form1" runat="server">
        <div class="d-flex justify-content-center">
                <canvas class="chart boxInner" id="gaugeElement2"></canvas>
        </div>
    </form>
 
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.js"></script>
    <!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>-->
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
    <script src="//cdn.rawgit.com/Mikhus/canvas-gauges/gh-pages/download/2.1.5/all/gauge.min.js"></script>
    <script src="../../Scripts/poly-fill.js"></script>
 
 
    <asp:PlaceHolder ID="placeSignalR" runat="server">
        <script src="/Scripts/jquery.signalR-2.2.2.js?version=1.03"></script>
        <script src="/signalr/hubs"></script>
        <script src="/Scripts/SignalR-Dashboard.js?version=1.80"></script>
    </asp:PlaceHolder>
 
 
    <script>
        $(window).resize(function () {
            resizeCanvas();
        });
 
        $(window).ready(function () {
            resizeCanvas();
        });
        /**
         
        function changeGaugeSize() {
            if( $(window).width() < 1000 ) {
            hewsawLpmGauge.update({
                width: 200,
                height: 200
                });
            headrigLpmGauge.update({
                width: 200,
                height: 200
                });
            sorterFBMpmGauge.update({
                width: 200,
                height: 200
                });
        }**/
    </script>
 
    <script>
        function resizeCanvas() {
            var size;
            if ($(window).width() < 550) {
                size = 350;
            } else if ($(window).width() < 1000) {
                size = 350;
            } else {
                size =  350;
            };
 
            $("[id^=gaugeElement]").width(size).height(size);
        }
 
    </script>
 
    <script>
 
        var headrigLpmGauge = new RadialGauge({
            renderTo: 'gaugeElement2',
            width: 300,
            height: 300,
            units: "logs/min",
            title: 'Headrig',
            minValue: 0,
            maxValue: 20,
            majorTicks: [
                "0",
                "5",
                "10",
                "15",
                "20"
            ],
            minorTicks: 5,
            strokeTicks: true,
            highlights: [
                {
                    "from": 0,
                    "to": 13,
                    "color": "rgba(255, 255, 255, .35)"
                },
                {
                    "from": 13,
                    "to": 17,
                    "color": "rgba(0, 200, 0, .65)"
                },
                {
                    "from": 17,
                    "to": 20,
                    "color": "rgba(255, 255, 255, .35)"
                }
            ],
            colorPlate: "#000",
            colorTitle: "#FFF",
            colorUnits: '#CCC',
            colorNumbers: '#eee',
            colorNeedleStart: 'rgba(240, 128, 128, 1)',
            colorNeedleEnd: 'rgba(255, 160, 122, .9)',
            borderShadowWidth: 0,
            borders: false,
            needleType: "arrow",
            needleWidth: 5,
            needleCircleSize: 7,
            needleCircleOuter: true,
            needleCircleInner: false,
            animationDuration: 500,
            animationRule: "linear",
            valueInt: 2,
            valueDec: 1
        }).draw();
 
 
 
    </script>
 
</body>
</html>

The HTML is not really helping us as we cannot run it, we were unable to use this to reproduce the issue.

Might you be able to give us some HTML which will enable us to reproduce the issue?

I purchased a web-site from Godaddy with an IIS backend. When I have some time, I’ll set up a similar page using Ajax and see if that has the same issue. Then I’ll forward that to you.