home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Di Gi Charat Mail
/
disc2.iso
/
disc1
/
ie5
/
IENT_S4.CAB
/
IENT_4.CAB
/
MSHTMLER.DLL
/
HTML
/
EDLINK.DLG
< prev
next >
Wrap
Text File
|
1999-04-01
|
9KB
|
342 lines
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN">
<HTML id=dlgLink style="font-family: MS UI Gothic; font-size: 9pt;
width: 36.7em; height: 12.3em; ">
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<TITLE>ânâCâpü[âèâôâN</TITLE>
<SCRIPT>
function callHelp(elm)
{
if (null != elm.helpid)
{
window.showHelp(elm.helpfile, "" + parseInt(elm.helpid),
"popup");
}
else
{
if ("BODY" != elm.tagName)
{
callHelp(elm.parentElement);
}
}
}
function btnCancelClick()
{
window.close();
}
function getTextRange(elm)
{
var r = elm.parentTextEdit.createTextRange();
r.moveToElementText(elm);
return r;
}
function mouseClick()
{
if (window.event.srcElement.id.substring(0,3)
== "txt")
{
return;
}
if (window.event.button == 2)
{
callHelp(window.event.srcElement);
}
}
function txtDefaultESC()
{
if (event.keyCode == 27)
{
window.close();
return;
}
}
window.onerror = HandleError
var L_Dialog_ErrorMessage = "é▒é╠â_âCâAâìâOé┼âGâëü[é¬ö¡É╢é╡é▄é╡é╜üB";
var L_ErrorNumber_Text = "âGâëü[: ";
function HandleError(message, url, line)
{
var str = L_Dialog_ErrorMessage + "\n\n"
+ L_ErrorNumber_Text + line + "\n"
+ message;
alert (str);
window.close();
return true;
}
var g_fOKEnabled = false;
var g_fURLLoaded = false;
function findAnchor(range)
{
var rangeWorking;
var elmWorking;
var index;
elmWorking = range.parentElement()
while ("HTML" != elmWorking.tagName)
{
if ("A" == elmWorking.tagName)
{
return elmWorking;
}
else
{
elmWorking = elmWorking.parentElement
}
}
rangeWorking = range.duplicate();
rangeWorking.collapse(true);
rangeWorking.moveEnd("character", 1);
while (rangeWorking.compareEndPoints("EndToEnd", range) < 0)
{
rangeWorking.move("Character");
if (null != findAnchor(rangeWorking))
{
return findAnchor(rangeWorking);
}
}
return null;
}
function getProtocolFromURL(strURL)
{
var index;
return strURL.substring(0, strURL.indexOf(":") + 1);
}
function updateProtocolSel()
{
var index;
var strProtocol = getProtocolFromURL(txtURL.value);
selProtocol.value = strProtocol;
if (selProtocol.value != strProtocol)
{
selProtocol.value = "";
}
}
function updateProtocolTxt()
{
var strSlashProts = " file:ftp:gopher:http:https:";
var strProtocolTxt = getProtocolFromURL(txtURL.value);
var strProtocolSel = selProtocol.value;
var strTempURL;
if ("//" == (txtURL.value.substring(strProtocolTxt.length,
strProtocolTxt.length + 2)))
{
strProtocolTxt = strProtocolTxt + "//";
}
strTempURL = txtURL.value.substring(strProtocolTxt.length);
if (0 < strSlashProts.indexOf(strProtocolSel))
{
strProtocolSel = strProtocolSel + "//";
}
txtURL.value = strProtocolSel + strTempURL;
}
function setOKState(fKeyPress)
{
var htmlKeyAlt = 18;
if (!g_fURLLoaded)
{
if (!fKeyPress || htmlKeyAlt != event.keyCode)
{
if ((("" == txtURL.value) || (txtURL.value == selProtocol.value)
||(txtURL.value == selProtocol.value + "//"))
== g_fOKEnabled)
{
btnOK.disabled = g_fOKEnabled
g_fOKEnabled = !g_fOKEnabled;
}
}
else
{
window.setTimeout("setOKState(false)", 10);
}
}
}
function bdyLoad()
{
var globalDoc = window.dialogArguments;
var rngMaster;
var rngLink;
var elmLink;
document.onhelp = new
Function("callHelp(window.event.srcElement)");
document.onmouseup = new Function("mouseClick()");
selProtocol.onchange = new Function("updateProtocolTxt()");
btnOK.onclick = new Function("btnOKClick()");
btnCancel.onclick = new Function("btnCancelClick()");
txtURL.onfocus = new Function("txtURL.select()");
txtURL.onkeyup = new Function("setOKState(true)");
txtURL.onkeypress = new Function("txtDefaultESC()");
if ("Control" == globalDoc.selection.type)
{
rngMaster = globalDoc.selection.createRange();
if (1 == rngMaster.length)
{
rngMaster = getTextRange(rngMaster(0));
rngMaster.select();
}
}
if (("Text" == globalDoc.selection.type) ||
("None" == globalDoc.selection.type))
{
rngMaster = globalDoc.selection.createRange();
elmLink = findAnchor(rngMaster);
if (null != elmLink)
{
rngLink = getTextRange(elmLink);
if (rngLink.compareEndPoints("StartToStart", rngMaster) < 0)
{
rngMaster.setEndPoint("StartToStart", rngLink);
}
if (rngLink.compareEndPoints("EndToEnd", rngMaster) > 0)
{
rngMaster.setEndPoint("EndToEnd", rngLink);
}
rngMaster.select();
if ("" != elmLink.href)
{
txtURL.value = elmLink.href;
txtURL.href = elmLink.href;
g_fURLLoaded = true;
btnOK.disabled = false;
}
updateProtocolSel();
}
txtURL.focus();
txtURL.select();
setOKState(false);
}
}
function IsRangeEmpty( range )
{
var tempRange;
tempRange = range.duplicate();
result = tempRange.compareEndPoints( "StartToEnd", range );
if ( result == 0 )
{
return true;
}
else
{
return false;
}
}
function btnOKClick()
{
var globalDoc = window.dialogArguments;
var cmdCreateLink = "CreateLink";
var cmdUnlink = "Unlink";
var range = globalDoc.selection.createRange();
var strSlashProts = " file:ftp:gopher:http:https:";
var strProtocol = selProtocol.value;
var dupRange;
var initialRange;
var iRight;
var fUseExecCommand = true;
if ("" == txtURL.value)
{
range.execCommand(cmdUnlink, false);
window.close();
return;
}
if (g_fURLLoaded && (txtURL.value == txtURL.href))
{
window.close();
return;
}
updateProtocolSel();
if (0 < strSlashProts.indexOf(strProtocol))
{
strProtocol = strProtocol + "//";
}
initialRange = range.duplicate();
if ( IsRangeEmpty( range ) )
{
range.text = txtURL.value;
fUseExecCommand = false;
}
else
{
dupRange = range.duplicate();
iRight = dupRange.moveEnd( "Character", 2 );
if ( iRight < 2 && dupRange.htmlText == "" )
{
range.text = txtURL.value;
fUseExecCommand = false;
}
}
if ( fUseExecCommand )
{
range.execCommand(cmdCreateLink, false, txtURL.value);
}
else
{
dupRange = range.duplicate();
dupRange.move( "Character", -1 );
elmParent = dupRange.parentElement();
if (elmParent.tagName == "A")
{
elmParent.href = txtURL.value;
}
else
{
range.setEndPoint( "StartToEnd", initialRange );
range.execCommand(cmdCreateLink, false, txtURL.value);
}
}
window.close();
}
</SCRIPT>
</HEAD>
<BODY id=bdy style="font-family: MS UI Gothic; font-size: 9pt;
background: threedface; color: windowtext;"
onLoad="bdyLoad()" scroll=no>
<FIELDSET id=fldLink style="font-family: MS UI Gothic; font-size: 9pt;
position: absolute; left: 0.98em; top: .8em; width: 26.2em;
height: 7.9em;">
<LEGEND id=lgdLink>
ânâCâpü[âèâôâNÅεò±
</LEGEND>
</FIELDSET>
<DIV id=div2 style="font-family: MS UI Gothic; font-size: 9pt; position: absolute;
left: 1.82em; top: 2.8899em; width: 3.5em; height: 1.2168em; ">
<LABEL id=lblProtocol FOR=selProtocol tabIndex=-1 helpid="35550"
helpfile=msoe.hlp>
Äφù▐(<U>T</U>):
</LABEL>
</DIV>
<select id=selProtocol size=1 ACCESSKEY=t tabIndex=50
style="font-family: MS UI Gothic; font-size: 9pt; position: absolute;
left: 5.64em; top: 2.7378em; width: 6.44em; height: 2.1294em; "
helpid="35550" helpfile=msoe.hlp>
<OPTION id=optOther value=""> (é╗é╠æ╝) </OPTION>
<OPTION id=optFile value="file:"> file: </OPTION>
<OPTION id=optFtp value="ftp:"> ftp: </OPTION>
<OPTION id=optGopher value="gopher:"> gopher: </OPTION>
<OPTION id=optHttp value="http:" SELECTED> http: </OPTION>
<OPTION id=optHttps value="https:"> https: </OPTION>
<OPTION id=optMailto value="mailto:"> mailto: </OPTION>
<OPTION id=optNews value="news:"> news: </OPTION>
<OPTION id=optTelnet value="telnet:"> telnet: </OPTION>
<OPTION id=optWais value="wais:"> wais: </OPTION>
</select>
<DIV id=div3 style="font-family: MS UI Gothic; font-size: 9pt; position: absolute;
left: 1.82em; top: 5.9319em; width: 3.5em; height: 1.2168em; ">
<LABEL id=lblURL FOR=txtURL tabIndex=-1 helpid="35550"
helpfile=msoe.hlp>
URL(<U>U</U>):
</LA