home *** CD-ROM | disk | FTP | other *** search
/ Chip: Shareware for Win 95 / Chip-Shareware-Win95.bin / komunik / ie40 / ie4nt_s2.cab / IE4NT_2.CAB / MSHTML.DLL / 2110 / FORPAR.DLG < prev    next >
Encoding:
Text File  |  1997-07-12  |  7.7 KB  |  241 lines

  1. <HTML STYLE="font-family: ms sans serif; font-size: 8pt; width: 30.4em;
  2. height: 15em">
  3. <HEAD>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <TITLE id=dialogTitle>
  6. Paragraph
  7. </TITLE>
  8. <SCRIPT>
  9. function getRadioStateCmd(radio, range)
  10. {
  11.  if (range.queryCommandEnabled(radio.value.substring(4)))
  12.  {
  13.   if(!range.queryCommandIndeterm(radio.value.substring(4)))
  14.   {
  15.    radio.checked
  16.     = range.queryCommandState(radio.value.substring(4));
  17.   }
  18.  }
  19. function getSelectStateCmd(select, range)
  20. {
  21.  var index;
  22.  var globalDoc = window.dialogArguments.document;
  23.  if (globalDoc.queryCommandSupported(select.id.substring(3)))
  24.  {
  25.   for (index = 0; index < select.options.length; index++)
  26.   {
  27.    if ((select.options[index].text)
  28.     == (range.queryCommandValue(select.id.substring(3))))
  29.    {
  30.     select.selectedIndex = index;
  31.     break;
  32.    }
  33.   }
  34.  }
  35. function initDialogCmd()
  36. {
  37.  var index;
  38.  var globalDoc = window.dialogArguments.document;
  39.  for (index = 0; index < document.all("radJustify").length; index++)
  40.  {
  41.   getRadioStateCmd(document.all("radJustify")[index],
  42.    globalDoc.selection.createRange());
  43.  }
  44.  getSelectStateCmd(cmdFormatBlock, globalDoc.selection.createRange());
  45. function setRadioStateCmd(radio, range)
  46. {
  47.  if (radio.checked != range.queryCommandState(radio.value.substring(4)))
  48.  {
  49.   if (range.queryCommandEnabled(radio.value.substring(4)))
  50.   {
  51.    range.execCommand(radio.value.substring(4));
  52.   }
  53.  }
  54. function setSelectStateCmd(select, range)
  55. {
  56.  var globalDoc = window.dialogArguments.document;
  57.  if (select.changed && (select.value != ""))
  58.  {
  59.   if (globalDoc.queryCommandSupported(select.id.substring(3)))
  60.   {
  61.    range.execCommand(select.id.substring(3), false,
  62.     select.options[select.selectedIndex].value);
  63.   }
  64.  }
  65. function closeDialogCmd()
  66. {
  67.  var index;
  68.  var globalDoc = window.dialogArguments.document;
  69.  for (index = 0; index < document.all("radJustify").length; index++)
  70.  {
  71.   setRadioStateCmd(document.all("radJustify")[index],
  72.    globalDoc.selection.createRange());
  73.  }
  74.  setSelectStateCmd(cmdFormatBlock, globalDoc.selection.createRange());
  75. function number(string)
  76. {
  77.  return parseFloat(string);
  78. function walkToText(doc)
  79. {
  80.  var currentRange;
  81.  var element;
  82.  while (("None" != doc.selection.type) && ("Text" != doc.selection.type))
  83.  {
  84.   currentRange = doc.selection.createRange();
  85.   element = currentRange.parentElement();
  86.   currentRange = getTextRange(element);
  87.   currentRange.select();
  88.  }
  89. function loadBdy()
  90. {
  91.  var globalDoc = window.dialogArguments.document;
  92.  document.onkeypress = new Function("defaultActions()");
  93.  document.onhelp  = new Function("callHelp()");
  94.  cmdFormatBlock.onchange = new Function("cmdFormatBlock.changed = true");
  95.  btnOK.onclick  = new Function("btnOKClick()");
  96.  btnCancel.onclick = new Function("btnCancelClick()");
  97.  walkToText(globalDoc);
  98.  initDialogCmd();
  99. function btnCancelClick()
  100. {
  101.  window.close();
  102. function btnOKClick()
  103. {
  104.  closeDialogCmd();
  105.  window.close();
  106. function defaultActions()
  107. {
  108.  var htmlKeyReturn = 13;
  109.  var htmlKeyEscape = 27;
  110.  if ((event.keyCode) == htmlKeyReturn)  
  111.  {
  112.    btnOKClick();
  113.  }
  114.  else if ((event.keyCode) == htmlKeyEscape) 
  115.  {
  116.   btnCancelClick();
  117.  }
  118. function callHelp()
  119. {
  120.  var L_NoHelp_Text = "No help topic available.";
  121.  var elm = window.event.srcElement;
  122.  if (null != elm.helpid)
  123.  {
  124.   if ("btnCancel" != elm.id)
  125.   {
  126.    alert(L_NoHelp_Text);
  127.   }
  128.   else
  129.   {
  130.    window.showHelp("windows.hlp", parseInt(elm.helpid));
  131.   }
  132.  }
  133. </SCRIPT>
  134. </HEAD>
  135. <BODY style="font-family: ms sans serif; font-size: 8pt;
  136. background: buttonface;" onLoad="loadBdy()">
  137. <DIV style="font-family: ms sans serif; font-size: 8pt; position: absolute;
  138. LEFT: 1em; TOP: 1em; WIDTH: 8em; HEIGHT: 1em">
  139. <LABEL For=cmdFormatBlock id=lblParaStyle tabIndex=-1>
  140. <U>P</U>aragraph Style
  141. </LABEL>
  142. </DIV>
  143. <SELECT id=cmdFormatBlock ACCESSKEY=p NAME="setCmdID" tabIndex=10
  144. style="font-family: ms sans serif; font-size: 8pt; LEFT: 1em; TOP: 2.5em;
  145. WIDTH: 27.7em; HEIGHT: 2.1em; position: absolute;">
  146. <OPTION id=none   VALUE="" selected>     </OPTION>
  147. <OPTION id=optNormal VALUE="<P>">  Normal   </OPTION>
  148. <OPTION id=optFormatted VALUE="<PRE>">  Formatted  </OPTION>
  149. <OPTION id=optAddress VALUE="<ADDRESS>"> Address   </OPTION>
  150. <OPTION id=optH1  VALUE="<H1>">  Heading 1  </OPTION>
  151. <OPTION id=optH2  VALUE="<H2>">  Heading 2  </OPTION>
  152. <OPTION id=optH3  VALUE="<H3>">  Heading 3  </OPTION>
  153. <OPTION id=optH4  VALUE="<H4>">  Heading 4  </OPTION>
  154. <OPTION id=optH5  VALUE="<H5>">  Heading 5  </OPTION>
  155. <OPTION id=optH6  VALUE="<H6>">  Heading 6  </OPTION>
  156. <OPTION id=optNumList VALUE="<OL>">  Numbered List </OPTION>
  157. <OPTION id=optBullet VALUE="<UL>">  Bulleted List </OPTION>
  158. <OPTION id=optDirList VALUE="<DIR>">  Directory List </OPTION>
  159. <OPTION id=optMenuList VALUE="<MENU>">  Menu List  </OPTION>
  160. <OPTION id=optDefTerm VALUE="<DT>">  Definition Term </OPTION>
  161. <OPTION id=optDef  VALUE="<DD>">  Definition  </OPTION>
  162. </SELECT>
  163. <TABLE cellspacing cellPadding=7 borderColorDark=buttonhighlight
  164. borderColorLight=buttonshadow border=1 noshade="yes"
  165. style="position:absolute;font-family: ms sans serif; font-size: 8pt;
  166. LEFT: 1em; TOP: 5.5em; WIDTH: 28em; HEIGHT: 3em">
  167. <TR>
  168.  <TD style="font-family: ms sans serif; font-size: 8pt;
  169.     LEFT: 0; TOP: 0; WIDTH: 19em; HEIGHT: 2em">
  170.  <DIV style="color: buttonface">a</DIV>
  171.  </TD>
  172. </TR>
  173. </TABLE>
  174.   <INPUT name=radJustify id=radJustifyLeft type=radio CHECKED
  175.   ACCESSKEY=l VALUE=_cmdJustifyLeft tabIndex=15
  176.   style="font-family: ms sans serif; font-size: 8pt; LEFT: 6.6em;
  177.   TOP: 6.5em; position: absolute; WIDTH: 1em; HEIGHT: 1em;">
  178.   <DIV style="font-family: ms sans serif; font-size: 8pt; position:
  179.   absolute;LEFT: 8.3em; TOP: 6.5em; WIDTH: 3em; HEIGHT: 1em">
  180.   <LABEL style="font-family: ms sans serif; font-size: 8pt"
  181.   For=radJustifyLeft id=lblJustifyLeft tabIndex="-1">
  182.   <U>L</U>eft
  183.   </LABEL>
  184.   </DIV>
  185.   <INPUT name=radJustify id=radJustifyCenter type=radio ACCESSKEY=c
  186.   VALUE=_cmdJustifyCenter tabIndex=20
  187.   style="font-family: ms sans serif; font-size: 8pt; LEFT: 12.1em;
  188.   TOP: 6.5em; position: absolute; WIDTH: 1em; HEIGHT: 1em">
  189.   <DIV style="font-family: ms sans serif; font-size: 8pt;
  190.   position: absolute;LEFT: 13.8em; TOP: 6.5em; WIDTH: 4em;
  191.   HEIGHT: 1em">
  192.   <LABEL style="font-family: ms sans serif; font-size: 8pt"
  193.   For=radJustifyCenter id=lblJustifyCenter tabIndex="-1">
  194.   <U>C</U>enter
  195.   </LABEL>
  196.   </DIV>
  197.   <INPUT name=radJustify id=radJustifyRight type=radio ACCESSKEY=r
  198.   VALUE=_cmdJustifyRight tabIndex=25
  199.   style="font-family: ms sans serif; font-size: 8pt; LEFT: 18.6em;
  200.   TOP: 6.5em; position: absolute; WIDTH: 1em; HEIGHT: 1em">
  201.   <DIV style="font-family: ms sans serif; font-size: 8pt;
  202.   position: absolute;LEFT: 20.3em; TOP: 6.5em; WIDTH: 3em;
  203.   HEIGHT: 1.3em">
  204.   <LABEL style="font-family: ms sans serif; font-size: 8pt"
  205.   For=radJustifyRight lblJustifyRight tabIndex="-1">
  206.   <U>R</U>ight
  207.   </LABEL>
  208.   </DIV>
  209. <DIV style="font-family: ms sans serif; font-size: 8pt; position: absolute;
  210. background: buttonface; HEIGHT: 1em; LEFT: 1.5em; TOP: 5em; WIDTH: 5em">
  211. <LABEL id=lblAlign tabIndex="-1"> Align Text</LABEL>
  212. </DIV>
  213. <BUTTON id=btnOK tabIndex=30
  214. style="font-family: ms sans serif; font-size: 8pt; LEFT: 14.4em; TOP: 9.5em;
  215. WIDTH: 6.8em; HEIGHT: 2.1em; position: absolute">
  216. OK</BUTTON>
  217. <!--
  218. <BUTTON id=btnClear onclick="btnClearClick()" tabIndex=35
  219. style="font-family: ms sans serif; font-size: 8pt; LEFT: 14.4em; TOP: 9.5em;
  220. WIDTH: 6.8em; HEIGHT: 2.1em; position: absolute">
  221. Clear All</BUTTON>
  222. -->
  223. <BUTTON id=btnCancel tabIndex=40
  224. style="font-family: ms sans serif; font-size: 8pt; LEFT: 22em; TOP: 9.5em;
  225. position: absolute; WIDTH: 6.8em; HEIGHT: 2.1em">
  226. Cancel</BUTTON>
  227. </BODY></HTML>
  228.