Hi,
I have set up a page that currently has 2 buttons that open the pages in an array, and also creates the links for individual opening.
In work we have two platforms for support, a set top box and a cable modem. Each platform uses different links and shares some of the links.
At present it only works for my platform.
I want to be able to make it work for both with a radio button for choice.
I was thinking of adding a checkbox to each link, so that users can choose whether or not to open all the pages, and store their choices in a cookie. I was also thinking of having a separate array for the links for each platform with another array for the common links.
The problem I have is on loading the page I have no idea which platform the user is on to generate the links as I do at present, at least until I get a cookie written.
Looking for some advice on how to approach this or a completely different method that would work. The code so far is as follows.
TIA
<html>
<head>
<title>NTL Pages</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<script language=”javascript” type=”text/javascript”>
<!–
var pfx=”http://”;
var tgt=”_blank”;
var arrName = new Array();
var arrUrl = new Array();
var arrDisplay = new Array();
arrName[0] = “sabs”;
arrDisplay[0] = “SABS”
arrUrl[0] = “portal.sabs.private.ntl.com/”;
arrName[1] = “iams”;
arrDisplay[1] = “IAMS”;
arrUrl[1] = “42.65.12.20/dtv/csa_start.html”;
arrName[2] = “nexushome”;
arrDisplay[2] = “Nexus Home Tab”;
arrUrl[2] = “nexus”;
arrName[3] = “data”;
arrDisplay[3] = “ICMS Data Capture”
arrUrl[3] =
“nexus/content/popup.asp?url=/apps/forms/rescode_datacapture.asp&uid=2098”
arrName[4] = “nexusdept”;
arrDisplay[4] = “Nexus Dept Tab”
arrUrl[4] = “nexus/content/departments.asp”
arrName[5] = “intranet”;
arrDisplay[5] = “Intranet”
arrUrl[5] = “groupintranet/home/default.asp”
arrName[6] = “ufault”;
arrDisplay[6] = “UBR Faults”
arrUrl[6] = “nexus/apps/ubrcheck/search.asp?launch=true”
arrName[7] = “pfault”;
arrDisplay[7] = “Popup Faults”
arrUrl[7] = “nexus/content/popup.asp?url=
arrName[8] = “ifault”;
arrDisplay[8] = “ICMS Fault Ticket Form”
arrUrl[8] = “nexus/content/popup.asp?url=/apps/forms/bromley_tickets.asp?type=stb&uid=2195”
function OpenPage(){
for (var i=0; i<arrName.length; i++) {
arrName[i]=window.open(pfx + arrUrl[i], arrName[i]);
}
}
function ClosePage() {
for (var i=0; i<arrName.length; i++) {
if (arrName[i] && !arrName[i].closed) arrName[i].close();
}
}
function WritePage() {
for (var i=0; i<arrName.length; i++) {
document.write(‘<p><a href=’ + pfx + arrUrl[i] + ‘ target=’ + tgt + ‘>’
+ arrDisplay[i] + ‘</a></p>’)
}
}
//–>
</script>
</head>
<body bgcolor=”#FFFFFF” text=”#000000″>
<p align=”center”><font size=”6″><b>NTL Start HTML Page</b></font></p>
<p> </p>
<p>Use the links below to open the web applications individually, and use
the
open button to open them all at once.</p>
<form name=”form1″>
<p><input type=”button” name=”cmdOpenPage” value=”Open Pages”
onClick=”OpenPage()”></p>
<p>
<input type=”button” name=”cmdClosePage” value=”Close Pages”
onClick=”ClosePage()”>
</p>
<p> </p>
</form>
<script language=”JavaScript”>
WritePage()
</script>
</body>
</html>