tags:

views:

34

answers:

0

I am using the following code but I have noticed that when I change the dashboard URL array to include lengthy XML URLs that include characters like "#", "-", and "=" and I have several URLs listed in the array, only the first URL is processed and the other two are ignored.

For example, the URLs might be like:

dashboards: [
{url:"http://www.abc-drf-qaz.mydomain.details/folder1/folder2/job#f=Qwerty/fff/FFF.xml",time:5},
{url:"http://www.abc-drf-qaz.mydomain.details/folder1/folder2/job#f=Qwerty/ggg/GGG.xml",time:5},
{url:"http://www.abc-drf-qaz.mydomain.details/folder1/folder2/job#f=Qwerty/hhh/HHH.xml",time:5} ],

Can people please suggest what could be happening, such as:

  • Is there a limitation of length with the data URL in the array?
  • Are the characters "#", "=", "-" preventing the 2nd and 3rd URLs from processing?
  • That the URL is an XML URL?
  • Something else?

Any help would be appreciated as only the first URL in the array is being processed and all others are ignored.

<html lang="en">
<head>
<title>Dashboard Example</title>
<style type="text/css">
body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
iframe { border: none; }
</style>
<script type="text/javascript">
var Dash = {
    nextIndex: 0,
    dashboards:
       [{
          url: "http://www.abc-drf-qaz.mydomain.details/folder1/folder2/job#f=Qwerty/fff/FFF.xml",
          time: 5
        },
        {
          url: "http://www.abc-drf-qaz.mydomain.details/folder1/folder2/job#f=Qwerty/ggg/GGG.xml",
          time: 5
        },
        {
          url: "http://www.abc-drf-qaz.mydomain.details/folder1/folder2/job#f=Qwerty/hhh/HHH.xml",
          time: 5
        }],
    display: function()
    {
        var dashboard = Dash.dashboards[Dash.nextIndex];
        frames["displayArea"].location.href = dashboard.url;
        Dash.nextIndex = (Dash.nextIndex + 1) % Dash.dashboards.length;
        setTimeout(Dash.display, dashboard.time * 1000);
    }
};

window.onload = Dash.display;
</script>
</head>
<body>
<iframe name="displayArea" width="100%" height="100%"></iframe>
</body>
</html>