/    Sign up×
Community /Pin to ProfileBookmark

Some advice please

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=http://trojan.private.ntl.com/apps/wbpu/outage/list.asp&uid=2112

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>&nbsp;</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>&nbsp;</p>
</form>

<script language=”JavaScript”>
WritePage()
</script>

</body>
</html>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @gasman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...