Script Name
NDMinh's HTML realtime editor
Simply click "Select All", and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or NoteTab) and save (Control-s or Apple-s). The script is yours!!!

<HTML>
<HEAD>
<!-- Writen by : Duong Minh - imeominh@yahoo.com -->
<!-- Downloaded from http://webgear.datacreek.net/ -->

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<TITLE>NDMinh's HTML realtime editor</TITLE>

<style type="text/css">
<!--

body {border: 2px solid #5E7CCC; margin: 0;}

-->
</style>

<style>
<!--

.hidden {
   position: static;
   visibility: hidden;
}
.show {
   position: static;
   visibility: visible;
}
.newinput {
   background-color: gainsboro;
   font-family: Verdana;
   font-size: 10px;
   font-style: normal;
   font-weight: normal;
   line-height: 1;
   text-transform: none;
   color: black;
}
.newbutton{
   text-align: center;
   font-family: Verdana;
   font-size: 10px;
   font-style: normal;
   font-weight: normal;
   line-height: 1;
   text-transform: none;
   width: 80px;
   height: 20px;
}

-->
</style>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var NS4 = (document.layers);
var IE4 = (document.all);

var win = this;
var n = 0;

function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
if (NS4) {
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
if (n == 0) alert(str + " was not found in your document.");
}
if (IE4) {
txt = win.box.createTextRange();
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
else {
if (n > 0) {
n = 0;
findInPage(str);
}
else
alert(str + " was not found in your document.");
}
}
return false;
}
// End -->
</script>

<script>

helpstat = false;
stprompt = false;
basic = true;

function insertsmilie(smilieface){
        AddText(smilieface);
}

function thelp(swtch){
        if (swtch == 1){
                basic = false;
                stprompt = false;
                helpstat = true;
        } else if (swtch == 0) {
                helpstat = false;
                stprompt = false;
                basic = true;
        } else if (swtch == 2) {
                helpstat = false;
                basic = false;
                stprompt = true;
        }
}

function getActiveText(selectedtext) {
        text = (document.all) ? document.selection.createRange().text : document.getSelection();
        if (selectedtext.createTextRange) {
                   selectedtext.caretPos = document.selection.createRange().duplicate();
          }
        return true;
}

function AddText(NewCode) {
        if (box.createTextRange && box.caretPos) {
                var caretPos = box.caretPos;
                caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? NewCode + ' ' : NewCode;
                box.focus();
        }
        else {
                box.value+=NewCode
        }
}

</script>


<script language="Javascript">
<!--
function copyit(){
box2.value=text;
box2.select();
document.execCommand('Copy');

}
function cutit(){
box2.value=text;
box2.select();
document.execCommand('cut');
AddTxt="";
AddText(AddTxt);
}
function pasteit(){
box.focus();
document.execCommand('paste');
}
//-->
</script>

</HEAD>

<BODY style="background: #d4d4d4; margin: 1; margin-top: 1;" onload="box.onkeyup()">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="560">
  <tr>
    <td width="100%" valign="top" align="center" colspan="2"><!--HTML Entry-->
<script language="JavaScript">
function render(){
    var xemtruocSelected = false;
    if (viewtype[1].selected) {
        xemtruocSelected= true;
        pre.className='hidden';
        final.document.body.innerHTML='<font face=Verdana size=1>'+box.value+'</font>';
    } else { pre.className='show'; }
checkSize();
}
function render2(){

        final.document.body.innerHTML='<font face=Verdana size=1>'+box.value+'</font>';

}
function preview() {
        
                newWindow = window.open('view.htm', 'newWin', 'toolbar=no,location=no,scrollbars=yes,statusbar=no,top=0,width=500,height=560')
}

</script>

<SCRIPT>
<!--

function checkSize() {
theSize.value=(box.value.length)+" Bytes";}

//-->
</SCRIPT>

<table border="0" width="772" cellspacing="0">
  <tr>
    <td width="330" bgcolor="#5E7CCC"><p align=left><b><font face="Verdana" size="1" color="#FFFFFF">&nbsp;&nbsp;
      <font color=red size=2>&nbsp;</font></font><font size="2" face="Verdana" color="#FFFFFF">
      </font></b><font face="Verdana" color="#FFFFFF" size="1">
      - NDMinh's HTML real time editor v2.0 -</font></td>
    <td width="230" bgcolor="#5E7CCC" valign="top" align="right"><form name=search onSubmit="return findInPage(this.string.value);">
<p align="right"><font size="1" face="Verdana" color="#FFFFFF">Find</font><font color="#FFFFFF"><font size="1" face="Verdana">&nbsp;</font>
<input class=newinput name=string type=text size=15 onChange="n = 0;">
</font>
</form>
</td>
    <td width="204" bgcolor="#5E7CCC" valign="top" align="right">&nbsp;<font face="Verdana" size="1"><font color="#FFFFFF">Size&nbsp;
      :</font> </font><INPUT class=newinput onFocus="blur()" disable name=theSize size=23 value="Can not calculate this form">
    
</td>
  </tr>
  <tr>
    <td width="768" colspan="3"><font face=Verdana size=2>&nbsp;</font><font face="Verdana" size="1">Preview
      Options :</font><font face=Verdana size=2> </font><select class=newinput size="1" name="viewtype" onChange="render()">
    <option>After submit</option>
    <option selected>Immediately</option>
      </select> <input class="newbutton" name=pre type=button onfocus="render2()" value=Refresh>
      | <input class="newbutton" type=button onclick="copyit()" value=copy>
<input class="newbutton" type=button onclick="cutit()" value=cut>
<input class="newbutton" type=button onclick="pasteit()" value=paste> | <input class="newbutton" type=button onclick="preview()" value="Preview"> | <input class="newbutton" type="button" value="Exit" onclick="javascript:top.window.close()"></td>
  </tr>
  <tr>
    <td width="330"><td width="434" colspan="2">

</td>
  </tr>
</table>

  <tr>
    <td width="50%" valign="top" align="center"><!-- HTML custom code here -->

<textarea name="box" rows="20" cols="40" id="box" onkeyup="render()" onkeydown="render()" onchange=getActiveText(this) onclick=getActiveText(this) style="background-color: #F0F0F0; color: #000000" >

<b>Your HTML here</b>


</textarea>

<!-- End HTML custom code -->

<SCRIPT>
<!--
if(document.box)form=document.box;
-->
</SCRIPT>
    <td width="50%" valign="top" align="center">
<!--Iframe including rendered final-->

<iframe id=final style="overflow: auto;" width="360" height="350">
</iframe>

</td>
  </tr>
  <tr>
    <td width="100%" colspan="2"><p align="center"><font face="Verdana" size="1">Copyright
      2001 NDMinh&: <a href="mailto:imeominh@yahoo.com"><font color="#000000">imeominh@yahoo.com</font></a> </font></p>
</td>
  </tr>
</table>

<textarea class=hidden name=box2 rows="1" cols="20"></textarea>

<script>
<!--
checkSize(box);
-->
</script>

</body>

</html>
<!-- End of NDMinh's HTML real time editor -->



Close Window