Diff for /loncom/html/adm/dragmath/applet/EditMathPopup.html between versions 1.1 and 1.3

version 1.1, 2008/07/01 09:12:33 version 1.3, 2008/08/26 10:01:27
Line 2 Line 2
 <html>  <html>
 <head>  <head>
   
 <title>DragMath Latex Example</title>  <title>DragMath Equation Editor</title>
   
 <script>  <script>
   function insertAtCursor(doc, myField, myValue) {
    //IE support
    if (doc.selection) {
    myField.focus();
    sel = doc.selection.createRange();
    sel.text = myValue;
    }
    //MOZILLA/NETSCAPE support
    else if (myField.selectionStart || myField.selectionStart == '0') {
    var startPos = myField.selectionStart;
    var endPos = myField.selectionEnd;
    myField.value = myField.value.substring(0, startPos)
    + myValue + '\n\n'
    + myField.value.substring(endPos, myField.value.length);
    } else {
    myField.value += myValue;
    }
    }
   
 function renderLatex() {  function renderLatex() {
   var ans = document.DragMath.getMathExpression();      var ans = document.DragMath.getMathExpression();  
   var source = '<html>'    var source = '<m>$'
          + '<body>'  
          + '<h4>Latex Syntax: '  
          + ans  
          + '</h4>'  
          + '<applet code="HotEqn.class" codebase="HotEqn" archive="HotEqn.jar" height="300" width="600" name="my equation">'  
          + '<param name="equation" value="'  
          + ans           + ans
          + '"/>'           + '$</m>';
          + '</applet>'  
          + '</body>'  
          + '</html>'    var doc    = opener.targetDoc
          + '';    var target = doc.getElementById(opener.targetEntry);  
     insertAtCursor(doc, target, source);
   var target = document.getElementById('outputID');  
     var doc = target.contentDocument;    window.close();
         if (doc == undefined || doc == null)  
             doc = target.contentWindow.document;  
   doc.open();  
   doc.write(source);  
   doc.close();  
   
     
 }  }
Line 40  function renderLatex() { Line 48  function renderLatex() {
   
   
 <DIV align=left><FONT face=Arial color=#000080  <DIV align=left><FONT face=Arial color=#000080
 size=6><STRONG>DragMath Latex Example</STRONG></FONT></DIV>  size=6><STRONG>DragMath Latex Equation Editor</STRONG></FONT></DIV>
 <br><br>  <br><br>
   
 <applet name="DragMath" codebase="classes" code="Display.MainApplet.class" archive="Project.jar,AbsoluteLayout.jar,swing-layout-1.0.jar,jdom.jar,jep.jar" width=540 height=333>  <applet name="DragMath" codebase="classes" code="Display.MainApplet.class" archive="Project.jar,AbsoluteLayout.jar,swing-layout-1.0.jar,jdom.jar,jep.jar" width=540 height=333>
Line 55  To use this page you need a Java-enabled Line 63  To use this page you need a Java-enabled
 <input type='button' value='Render Latex' onclick='renderLatex(); return true;' />  <input type='button' value='Render Latex' onclick='renderLatex(); return true;' />
 </form>  </form>
   
 <H2>Latex Rendering:</H2>  
   
 <iframe id='outputID' src='' width='98%' height='150'>  
 </iframe>  
   
 </div>  
 <br>  
 Latex rendering performed by freeware Java applet <a href="http://www.atp.ruhr-uni-bochum.de/VCLab/software/HotEqn/HotEqn.html">HotEqn </a>  
 </body>  </body>
 </html>  </html>

Removed from v.1.1  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>