c:\export\olenmr\client\forcheckjs.htm Functions

7/24/2003 7:53:09 AM

Full Project List

code.js Functions

function appWrite(s,ndelay)
function appWriteDirect()
function cacheImage(s)
function checkbox(swhat,swho,sfunc,ischecked)
function createArrayFromList(slist)
function createListFromArray(A)
function createTable(s)
function createWindow(s,sopt)
function doCheckAll(sform,swhat,iTF)
function doLog(s)
function doWriteDirect(doc,sHTML,isreplace)
function flushRight(s,n)
function getCheckedValues(sform,swhat,iTF)
function getField(slist,skey,sdef)
function getFieldNum(slist,skey,sdef)
function getSelectedText(swhat)
function getSelectedValue(swhat)
function getText(swhat)
function getSelectText(sform,swhat,iallowblank)
function getTextValues(sform,swhat,iallowempty,iallowspace)
function hidden(swhat,svalue)
function hRef(sref,stext)
function jRef(sref,stext,smouseover)
function JSstring(scode)
function listHeader(sfunc,W)
function makeSelect(sname,A,def)
function makeTableData(s)
function makeTableRow()
function makeTableRowArray(S)
function na(swhat)
function newWindow(s,sopt)
function oRef(sref,stext)
function selectOptionByText(s,sdefault)
function serverWrite(s)
function setWidth(s,n)
function shiftArray(A)
function showArray(A)
function showArrayItems(A)
function showLog()
function sorta0(a,b)
function sortn(a,b)
function textbox(swhat,swho,isize,svalue)
function createTextArea(swhat,nrows,ncols,svalue)
function writeNewWindow(s,sopt)
function writeVersion()

   

file code.js  

view function appWrite(s,ndelay)
Sets up the writing of all of the pages for the site

parameters:

string

s

integer

ndelay

function return:

NONE

called by:

admin_write

admin_write2

admin_writeHTMLFiles

analysis_writeHTML

login_writeHTML

login_writeHTMLTeam

main_writeHTML

setup_writeHTML_noerror

setup_writeHTMLInfo

calls:

appWriteDirect

   

file code.js  

view function appWriteDirect()

function return:

NONE

called by:

appWrite

setup_writeHTML_noerror

calls:

doWriteDirect

   

file code.js  

view function cacheImage(s)
Not Implemented

parameters:

string

s

function return:

NONE

called by:

menu_addItem

calls:

   

file code.js  

view function checkbox(swhat,swho,sfunc,ischecked)
Sets up a checkbox that is used to remove members from teams

parameters:

string

swhat

string

swho

string

sfunc

integer

ischecked

function action:

makes a set of check boxes so that one can uncheck a team member if they are to be removed

function return:

return "<input type=checkbox onclick=parent.fraClient."+sfunc+"('"+s+"') name='"+s+"' "+(ischecked?"checked":"")+">";

called by:

team_shows

calls:

   

file code.js  

view function createArrayFromList(slist)
Allows an array to be returned that can read 1-3 as 1,2,3

parameters:

string

slist

function action:

Used for autosampler position setup

function return:

if(slist.length==0)return []; if(P.length==0)return Q; return Q;

called by:

sample_getList

sTI

calls:

   

file code.js  

view function createListFromArray(A)
Not Implemented

parameters:

array

A

function return:

if(A.length==0)return ""; return s;

called by:

calls:

   

file code.js  

view function createTable(s)
Not Implemented

parameters:

string

s

function return:

return s.replace(/\{/g,"\n<tr>").replace(/r\[/g,"[|align=right>").replace(/\[/g,"<td>").replace(/\]/g,"\n</td>").replace(/\>\|/g," ").replace(/\}/g,"</tr>");

called by:

calls:

   

file code.js  

view function createWindow(s,sopt)
Opens a new window

parameters:

string

s

string

sopt

function action:

Creates a random name for the window so that it appears on top of current window

function return:

return open(s,"N_"+sm,sopt);

called by:

newWindow

writeNewWindow

analysis_getView_noerror

help_writeHTML

setup_invokeExperHelp

calls:

   

file code.js  

view function doCheckAll(sform,swhat,iTF)
Checks all of the boxes in the team modification page

parameters:

string

sform

string

swhat

integer

iTF

function action:

looks for what to check and then checks them (iTF=true) or uncheckes them (iF=false)

function return:

NONE

called by:

team_invokeCheckAllMembers

team_invokeCheckAllTeams

team_invokeUncheckAllMembers

team_invokeUncheckAllTeams

calls:

   

file code.js  

view function doLog(s)
Used for testing purposes, creats log with time, date in it

parameters:

string

s

function action:

Writes a log or resets the log (s="")

function return:

NONE

called by:

client_sendXWinCommand

serverCall

serverReturn

deleteSession

login_invokeSetTeam

login_invokeSetTeam_error

logout_error

logout_noerror

setup_writeHTML_error

setup_writeHTMLInfo

calls:

hhmmss

   

file code.js  

view function doWriteDirect(doc,sHTML,isreplace)
Writes information to the server

parameters:

type?

doc

string

sHTML

integer

isreplace

function return:

NONE

called by:

appWriteDirect

serverWrite

calls:

   

file code.js  

view function flushRight(s,n)
Right justifies s in a field of n spaces

parameters:

string

s

integer

n

function return:

return sp.substring(sp.length-n,sp.length);

called by:

analysis_writeHTMLTable

calls:

   

file code.js  

view function getCheckedValues(sform,swhat,iTF)
Figures out what values have been checked

parameters:

string

sform

string

swhat

integer

iTF

function return:

return A;

called by:

team_getCheckedTeamsAndMembers

calls:

   

file code.js  

view function getField(slist,skey,sdef)
Finds information that is contained in a field of the form

parameters:

string

slist

string

skey

string

sdef

function return:

if(i<0)return sdef; return sval;

called by:

getFieldNum

calls:

   

file code.js  

view function getFieldNum(slist,skey,sdef)
Finds information that is contained in a field of the form and returns an integer value

parameters:

string

slist

string

skey

string

sdef

function return:

return parseInt(getField(slist,skey,sdef+""));

called by:

calls:

getField

   

file code.js  

view function getSelectedText(swhat)

parameters:

string

swhat

function return:

{return (CApp.document.forms[0][swhat]?CApp.document.forms[0][swhat][CApp.document.forms[0][swhat].selectedIndex].text:"")}

called by:

analysis_invokeGetData

analysis_ReadDefaults

setup_check

calls:

   

file code.js  

view function getSelectedValue(swhat)

parameters:

string

swhat

function return:

{return (CApp.document.forms[0][swhat]?(CApp.document.forms[0][swhat].selectedIndex>=0?CApp.document.forms[0][swhat][CApp.document.forms[0][swhat].selectedIndex].value:""):"")}

called by:

setup_check

setup_checkJobPriority

setup_getParams

setup_setExperiment

setup_setJobPriority

calls:

   

file code.js  

view function getText(swhat)

parameters:

string

swhat

function return:

{return (CApp.document.forms[0][swhat]?CApp.document.forms[0][swhat].value:"")}

called by:

setup_check

setup_getParams

calls:

   

file code.js  

view function getSelectText(sform,swhat,iallowblank)
Not Implemented

parameters:

string

sform

string

swhat

integer

iallowblank

function return:

return A;

called by:

calls:

   

file code.js  

view function getTextValues(sform,swhat,iallowempty,iallowspace)
Finds what is selected in a textbox

parameters:

string

sform

string

swhat

integer

iallowempty

integer

iallowspace

function return:

return A;

called by:

team_getNewTeamPositions

team_getNewTeamText

calls:

   

file code.js  

view function hidden(swhat,svalue)
Returns a hidden HTML form field

parameters:

string

swhat

string

svalue

function action:

Send a form to the server

function return:

return "<input type=hidden name=\""+swhat+"\" value=\""+svalue+"\">";

called by:

serverCall

calls:

   

file code.js  

view function hRef(sref,stext)
Creates an HTML long

parameters:

string

sref

string

stext

function action:

Insert something into the function and it will output in HTML

function return:

return "<A HREF=\""+sref+"\">"+stext+"</A>";

called by:

login_writeHTMLTeam

calls:

   

file code.js  

view function jRef(sref,stext,smouseover)
Creates an HTML link to a JavaScript command

parameters:

string

sref

string

stext

string

smouseover

function action:

Write javascript and HTML to page

function return:

return "<A HREF=\"javascript:parent.fraClient."+sref+"\""+(arguments.length==3?" onmouseover=\"parent.fraClient."+smouseover+"\"":"")+">"+stext+"</A>";

called by:

listHeader

admin_header

analysis_getViewRef

analysis_writeHTML

analysis_writeHTMLTable

exper_getExperDiv

exper_getJobHTML

exper_getParamHTML

login_writeHTMLTeam

logout_hRef

monitor_getCurrentDiv

setup_getInfoButton

setup_getInfoIcon

team_showFunctions

team_shows

menu_showIcon

calls:

   

file code.js  

view function JSstring(scode)

parameters:

string

scode

function return:

return s.replace(/\\/g,"\\\\");

called by:

analysis_getSpecJS

calls:

   

file code.js  

view function listHeader(sfunc,W)
Creates headers over a table that link to a specific function

parameters:

string

sfunc

array

W

function action:

Write the headers over the table

function return:

return s;

called by:

calls:

jRef

setWidth

   

file code.js  

view function makeSelect(sname,A,def)
Not Implemented

parameters:

string

sname

array

A

type?

def

function return:

return s;

called by:

analysis_writeHTML

calls:

   

file code.js  

view function makeTableData(s)
Puts data within the HTML table code

parameters:

string

s

function action:

write HTML

function return:

return "\n<TD><P>"+s+"</TD>";

called by:

makeTableRow

makeTableRowArray

calls:

   

file code.js  

view function makeTableRow()
Takes a variable number of parameters and uses them to build a table row

function action:

write HTML

function return:

return s.replace(/TD\>\<P\>\|/g,"TD ");

called by:

admin_header

calls:

makeTableData

   

file code.js  

view function makeTableRowArray(S)
Takes a variable number of data from an array and uses it to build a table row

parameters:

array

S

function action:

write HTML

function return:

return s.replace(/TD\>\<P\>\|/g,"TD ");

called by:

team_showFunctions

calls:

makeTableData

   

file code.js  

view function na(swhat)
sends a message indicating that a section of code has not been implemented

parameters:

string

swhat

function return:

NONE

called by:

calls:

   

file code.js  

view function newWindow(s,sopt)
Calls the function createWindow

parameters:

string

s

string

sopt

function action:

calls createWindow

function return:

NONE

called by:

calls:

createWindow

   

file code.js  

view function oRef(sref,stext)

parameters:

string

sref

string

stext

function return:

return "<A HREF=\"javascript:opener."+sref+"\">"+stext+"</A>";

called by:

analysis_showXWin

calls:

   

file code.js  

view function selectOptionByText(s,sdefault)
Adusts a select box to indicate the desired default item

parameters:

string

s

string

sdefault

function return:

return s;

called by:

setup_getInfoText

calls:

   

file code.js  

view function serverWrite(s)
Calls doWriteDirect so that information can be written to the server

parameters:

string

s

function return:

NONE

called by:

serverCall

serverReturn

login_writeHTML

main_invokeMain

calls:

doWriteDirect

   

file code.js  

view function setWidth(s,n)
A left justification method

parameters:

string

s

integer

n

function action:

Writes text from far left of page

function return:

return sp.substring(0,n);

called by:

listHeader

calls:

   

file code.js  

view function shiftArray(A)
Creates a new array that does not have the first element of the original

parameters:

array

A

function action:

Remove the first element of an array

function return:

if(A.length==0)return null; return n;

called by:

calls:

   

file code.js  

view function showArray(A)
Returns a string showing all array elements, used for debugging

parameters:

array

A

function return:

return s;

called by:

analysis_getXWin

calls:

   

file code.js  

view function showArrayItems(A)

parameters:

array

A

function return:

return s;

called by:

calls:

   

file code.js  

view function showLog()
Shows the session log in a new window

function action:

Creates a new window

function return:

NONE

called by:

main_invokeShowLog

calls:

writeNewWindow

   

file code.js  

view function sorta0(a,b)
Not Implemented

parameters:

type?

a

type?

b

function return:

{return a[0]b[0]?1:0}

called by:

calls:

   

file code.js  

view function sortn(a,b)
Used by array.sort() to sort an array of numbers

parameters:

type?

a

type?

b

function action:

Defines a zero value

function return:

{return ab?1:0}

called by:

calls:

   

file code.js  

view function textbox(swhat,swho,isize,svalue)
Creates an HTML textboxparam-swhat=string,

parameters:

string

swhat

string

swho

integer

isize

string

svalue

function action:

Writes a textbox

function return:

return "<input type=input size="+isize+" name='"+s+"' value='"+svalue+"'>";

called by:

team_shows

calls:

   

file code.js  

view function createTextArea(swhat,nrows,ncols,svalue)

parameters:

string

swhat

integer

nrows

integer

ncols

string

svalue

function return:

return "<textarea rows="+nrows+" cols="+ncols+" name='"+swhat+"'>"+svalue+"</textarea>";

called by:

setup_getInfoText

calls:

   

file code.js  

view function writeNewWindow(s,sopt)
Creates a new windwo and writes HTML into it

parameters:

string

s

string

sopt

function action:

Writes HTML for a new window

function return:

NONE

called by:

showLog

analysis_openSpectrum

analysis_showXWin

calls:

createWindow

   

file code.js  

view function writeVersion()

function return:

// s+='<form name=cmd onsubmit="alert(eval(document.cmd.what.value));return false">';

called by:

calls: