Hello again,
I tried what you suggested and for some reason it is not working.
<html>
<head>
<title>Rich Text Editor</title>
<style type="text/css">
.IsButton
{width:22;heigh t:22;margin:0;p adding:0;border-width:1px;borde r-color:#D0E4FC;b order-style:solid;}
</style>
<script type="text/JavaScript">
if(typeof Array().splice= ='undefined')
{
Array.prototype .splice=functio n(start, count)
{
for(var i=start; i+count<this.le ngth; i++)
this[i] = this[i+count];
this.length-=count;}
}
var buttonLocks=[];
function isLocked( elem, table )
{
for(var i=0; i<table.length && elem!=table[i]; i++);
return i==table.length ? -1 : i;
}
function mouse_out()
{
var src=event.srcEl ement;
if( isLocked(src, buttonLocks)==-1 )
if(src.classNam e=="IsButton")
{
window.status=" ";
src.style.backg roundColor = "#D0E4FC";
src.style.borde rTop = "#D0E4FC solid 1px";
src.style.borde rRight = "#D0E4FC solid 1px";
src.style.borde rLeft = "#D0E4FC solid 1px";
src.style.borde rBottom = "#D0E4FC solid 1px";
}
}
function mouse_over()
{
var src=event.srcEl ement;
if (isLocked(src, buttonLocks)==-1 )
if(src.classNam e=="IsButton")
{
window.status=s rc.alt;
src.style.backg roundColor = "#D0E4FC";
src.style.borde rBottom = "buttonshad ow solid 1px";
src.style.borde rLeft = "buttonhighligh t solid 1px";
src.style.borde rRight = "buttonshad ow solid 1px";
src.style.borde rTop = "buttonhighligh t solid 1px";
}
}
function mouse_down() {
var src=event.srcEl ement, index;
if( (index=isLocked (src, buttonLocks))==-1 )
buttonLocks[buttonLocks.len gth*]=src;
else
buttonLocks.spl ice(index, 1);
if(src.classNam e=="IsButton")
{
src.style.backg roundColor = "#D0E4FC";
src.style.borde rTop = "buttonshad ow solid 1px";
src.style.borde rRight = "buttonhighligh t solid 1px";
src.style.borde rLeft = "buttonshad ow solid 1px";
src.style.borde rBottom = "buttonhighligh t solid 1px";
}
}
function mouse_up()
{
var src=event.srcEl ement;
if (isLocked(src, buttonLocks)==-1)
if(src.classNam e=="IsButton")
{
src.style.backg roundColor = "#D0E4FC";
src.style.borde rBottom = "buttonshad ow solid 1px";
src.style.borde rLeft = "buttonhighligh t solid 1px";
}
}
</SCRIPT>
</head>
<body bgcolor="#D0E4F C">
<script language= "JavaScript " type= "text/javascript" src= "editor.js"
</script>
<form action="save.as p" name="edit" method="POST" id="edit"
onsubmit="retur n submitForm();">
<center>
<span name="tbar" onmouseover="mo use_over();"
onmousedown="mo use_down();" onmouseup="mous e_up();"
onmouseout="mou se_out();" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;">
<table width="880" bgcolor="#D0E4F C">
<tr>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'bold', '')"><img
src="../../common/images/richtexteditor/bold.gif" class="IsButton "
border="0" width="22" height="22" alt="Vet" title="Bold"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'underline', '')"><img
src="../../common/images/richtexteditor/under.gif" class="IsButton "
border="0" width="22" height="22" alt="Onderlijn"
title="Underlin e"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'italic', '')"><img
src="../../common/images/richtexteditor/italic.gif" class="IsButton "
border="0" width="22" height="22" alt="Cursief"
title="Italic"> </a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'justifyleft', '')"><img
src="../../common/images/richtexteditor/aleft.gif" class="IsButton "
border="0" width="22" height="22" alt="Links uitlijnen" title="Align
Left"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'justifycenter' , '')"><img
src="../../common/images/richtexteditor/center.gif" class="IsButton "
border="0" width="22" height="22" alt="Centraal uitlijnen" title="Align
Center"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'justifyright', '')"><img
src="../../common/images/richtexteditor/aright.gif" class="IsButton "
border="0" width="22" height="22" alt="Rechts uitlijnen" title="Align
Right"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'indent', '')"><img
src="../../common/images/richtexteditor/ileft.gif" class="IsButton "
border="0" width="22" height="22" alt="Indent" title="Indent"> </a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'outdent', '')"><img
src="../../common/images/richtexteditor/iright.gif" class="IsButton "
border="0" width="22" height="22" alt="Outdent"
title="Outdent" ></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'undo', '')"><img
src="images/undo.gif" class="IsButton " border="0" width="22"
height="22" alt="Undo" title="Undo"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'redo', '')"><img
src="images/redo.gif" class="IsButton " border="0" width="22"
height="22" alt="Redo" title="Redo"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'insertorderedl ist', '')"><img
src="../../common/images/richtexteditor/nlist.gif" class="IsButton "
border="0" width="22" height="22" alt="Opsomming met cijfers toevoegen"
title="Numberin g"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'insertunordere dlist', '')"><img
src="../../common/images/richtexteditor/blist.gif" class="IsButton "
border="0" width="22" height="22" alt="Opsomming met symbolen
toevoegen" title="Bullets" ></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'cut', '')"><img
src="../../common/images/richtexteditor/cut.gif" class="IsButton "
border="0" width="22" height="22" alt="Knippen" title="Cut"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'copy', '')"><img
src="../../common/images/richtexteditor/copy.gif" class="IsButton "
border="0" width="22" height="22" alt="Kopieren" title="Copy"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'paste', '')"><img
src="../../common/images/richtexteditor/paste.gif" class="IsButton "
border="0" width="22" height="22" alt="Plakken" title="Paste"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'superscript', '')"><img
src="images/superscript.gif " class="IsButton " border="0" width="22"
height="22" alt="Superscrip t" title="Superscr ipt"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'subscript', '')"><img
src="images/subscript.gif" class="IsButton " border="0" width="22"
height="22" alt="Subscript" title="SubScrip t"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'strikethrough' , '')"><img
src="images/strikethrough.g if" class="IsButton " border="0" width="22"
height="22" alt="Doorhalen" title="Striketh rough"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'justifyfull', '')"><img
src="images/justifyfull.gif " class="IsButton " border="0" width="22"
height="22" alt="Uitlijnen" title="Justifyf ull"></a></td>
<td bgcolor="#D0E4F C" ondragstart="ev ent.returnValue =false;"
onselectstart=" event.returnVal ue=false;"><a href=
"javascript
:edi torCommand('con tent', 'createlink', '')"><img
src="images/justifyfull.gif " class="IsButton " border="0" width="22"
height="22" alt="Link toevoegen" title="CreateLi nk"></a></td>
</tr>
</table>
</span>
<table width="880" bgcolor="#D0E4F C">
<tr>
<td>
<script language= "JavaScript " type= "text/javascript" >
<!--
function submitForm() {
updateEditor('c ontent');
return true;
}
initiateEditor( );
//-->
</script>
<script language= "JavaScript " type= "text/javascript" >
<!--
displayEditor(' content', '', 880, 600);
//-->
</script>
</td>
</tr>
<tr>
<td colspan="22" align="center"> <input type="submit" name="Submit"
value="Submit"> </td>
</tr>
</table>
</center>
</form>
</body>
</html>