home *** CD-ROM | disk | FTP | other *** search
- //**********************************************************************************
- //**
- //** File Name: tgctlsi.js
- //**
- //** Summary: SupportSoft SmartIssue JavaScript File
- //**
- //** Description: This file contains global functions and structures used by
- //** serveral pages to help create and manipulate SmartIssues.
- //**
- //** Copyright SupportSoft Inc. 2003, All rights reserved.
- //**
- //**********************************************************************************
-
- // SmartIssue object
- document.write('<object classid="CLSID:01111e00-3e00-11d2-8470-0060089874ed" height="0" width="0" id="si"></object>');
-
- //**********************************************************************************
- // Functions
- //**********************************************************************************
-
- //*******************************
- // Name: ssCreateIssue
- // Purpose: Create a SmartIssue using the local global server
- // Parameter: String -- Description of SmartIssue
- //*******************************
- function ssCreateIssue(strProblem)
- {
- try
- {
- si.SetCurrentServer(ssGetServerPath());
- var issueID = si.NewIssue('Install Qualifier');
- si.SetCurrentIssue(issueID);
- } catch(e) {
- alert(e.description)
- }
- }
-
- //*******************************
- // Name: ssGetIssueID
- // Purpose: Retrieve the ID of the current SmartIssue on the local global server
- // Return: GUID
- //*******************************
- function ssGetIssueID()
- {
- var issueID = '';
- try
- {
- si.SetCurrentServer(ssGetServerPath());
- issueID = si.GetCurrentIssue();
- } catch(e) {
- issueID = '';
- alert(e.description)
- }
- return issueID;
- }
-
- //*******************************
- // Name: ssGetUsername
- // Purpose: Return the username value from the SmartIssue. Used after user enters username and password
- // Return: String
- //*******************************
- function ssGetUsername()
- {
- document.si.SetCurrentServer(ssGetServerPath());
- var issueID = document.si.GetCurrentIssue();
- var issueFn = document.si.GetIssueFile(issueID);
- document.si.StartXMLIO(issueFn);
- var username = document.si.GetXMLValue("SDC_SAInfo","SDC_SAInfo", "username");
- document.si.EndXMLIO();
- return username;
- }
-
- //*******************************
- // Name: ssGetPassword
- // Purpose: Return the username value from the SmartIssue. Used after user enters username and password
- // Return: String
- //*******************************
- function ssGetPassword()
- {
- document.si.SetCurrentServer(ssGetServerPath());
- var issueID = document.si.GetCurrentIssue();
- var issueFn = document.si.GetIssueFile(issueID);
- document.si.StartXMLIO(issueFn);
- var password = document.si.GetXMLValue("SDC_SAInfo","SDC_SAInfo", "password");
- document.si.EndXMLIO();
- return password;
- }
-
- function ssUpdateSI(step,page)
- {
- document.si.EnableErrorExceptions(false);
- document.si.SetCurrentServer(ssGetServerPath());
- var errCode = 0, stat = false;
-
- var issueId = document.si.GetCurrentIssue();
- var issueFile = document.si.GetIssueFile(issueId);
-
- // Update the SmartIssue with new key/values
- document.si.StartXMLIO(issueFile);
-
- switch(ssGetCurrentPage())
- {
- case "modemtype.htm":
- document.si.UpdateXMLFile("SDC_SAInfo", "SDC_SAInfo", "AdapterType", ssGetReg("ModemType"), "");
- break;
-
- case "adapters.htm":
- step = ssGetNameIndex('adapters.htm?adapter=0');
- break;
-
- case "qual.htm":
- step = ssGetNameIndex('qual.htm?adapter=0');
- break;
- }
-
- document.si.EndXMLIO();
-
- }
-
-