home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
iis4_03.cab
/
iimimels.asp
< prev
next >
Wrap
Text File
|
1997-11-12
|
3KB
|
130 lines
<%@ LANGUAGE=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
function chgStatus(indexnum){
parent.head.document.hiddenform.index.value=indexnum
<% if Session("Browser") = "IE3" then %>
self.location.href="iimimels.asp#here";
<% else %>
self.location.href="iimimels.asp";
<% end if %>
}
function SetUpdated(){
//check to see if our event was triggered by a delete. if so, we don't
//want to set the cached object values, or we'll be overwriting
//the wrong item.
if (parent.head.listFunc.noupdate){
parent.head.listFunc.noupdate = false;
}
else{
i = parent.head.document.hiddenform.index.value
if (i > -1){
parent.head.cachedList[i].app = document.listform.app.value;
parent.head.cachedList[i].ext = document.listform.editMe.value;
parent.head.cachedList[i].updated = true;
top.title.Global.updated="true";
}
}
}
function crop(thestring,size)
{
<% if Session("FONTSIZE") = "LARGE" then %>
size = size-10;
<% end if %>
sLen = thestring.length
if (sLen > size)
{
thestring = thestring.substring(0,size) + "...";
}
else{
for (var i = sLen ; i < size; i++) {
thestring = thestring + " "
}
}
return thestring;
}
function displayVal(dispstr, altstr){
if (dispstr == ""){
dispstr = altstr;
}
return dispstr;
}
function writeCol(colspan,w,str){
var writestr = "<TD";
if (colspan != ""){
writestr += " COLSPAN = " + colspan
}
if (w != ""){
writestr += " WIDTH = " + w;
}
<% if Session("IsIE") then %>
writestr += " STYLE = 'font-face: Helv; font-size: 8pt;'";
<% end if %>
writestr += "><FONT SIZE = 1 FACE = 'Helv'>" + str + "</FONT></TD>";
return writestr;
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
<FORM NAME="listform">
<SCRIPT LANGUAGE="JavaScript">
editOK=false;
sel=eval(parent.head.document.hiddenform.index.value);
var writestr = "<TABLE BORDER=0 CELLPADDING = 2 CELLSPACING = 0>"
for (var i=0;i < parent.head.cachedList.length; i++) {
if (!parent.head.cachedList[i].deleted){
if (sel!=i) {
writestr += "<TR>";
if (i+4 == sel)
{
writestr += writeCol(1,85,"<A NAME='here'></A><A HREF='javascript:chgStatus("+i+");'>" + crop(parent.head.cachedList[i].ext,20) + "</A>");
}
else
{
writestr += writeCol(1,85,"<A HREF='javascript:chgStatus("+i+");'>" + crop(parent.head.cachedList[i].ext,20) + "</A>");
}
writestr += writeCol(1,167,parent.head.cachedList[i].app);
writestr += "</TR>";
}
else{
editOK=true;
writestr += "<TR BGCOLOR=#DDDDDD>";
writestr += writeCol(1,85,"<INPUT NAME='editMe' SIZE = 10 VALUE='" + parent.head.cachedList[i].ext + "' onBlur='SetUpdated();'>");
writestr += writeCol(1,167,"<INPUT NAME='app' SIZE = 20 VALUE='" + parent.head.cachedList[i].app + "' onBlur='SetUpdated();'>");
writestr += "</TR>";
}
}
}
writestr += "</TABLE>";
document.write(writestr);
</SCRIPT>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
<% if Session("isAdmin") then %>
if (editOK){
document.listform.editMe.focus();
}
<% end if %>
</SCRIPT>
</BODY>
</HTML>