lookitsme.co.uk "MessageEditor" does not work on mozilla 1.7/1.8

G

George

The webmaster told me this was because mozilla was not "up to date"
with Internet Explorer with Javascript.

Here is the code from the offending page...



<html><head>

<title>Lookitsme: About Me Editor</title>
<script language="JavaScript">
function Init(){
count(5000);
MessageEditor.document.designMode = "on";
MessageEditor.document.oncontextmenu=function() {return false;}
MessageEditor.document.onkeypress= function() { return count(5000);}
MessageEditor.document.onactivate= function() { return count(5000);}
window.focus();
}

function saveme()
{
count(5000);
document.submitform.editresult.value =
MessageEditor.document.body.createTextRange().htmlText;
}


function count(max) {
var msgString = MessageEditor.document.body.createTextRange().text;
var msgLength= msgString.length;
if (msgLength > max) {
msgString = msgString.substr(0,max);
msgLength=max;
alert("Sorry, you have reached the limit.\n");
}
document.counter.countup.value = msgLength;
document.counter.countdown.value = max-msgLength;
}
</script>
<script>
myString = new String(navigator.appName);
myRE = new RegExp("Explorer", "gi");
results = myString.match(myRE);

if(results.length < 1)
{
window.location = "noIE.html";
}

{alert("PLEASE READ THE BELOW:\n\n1. Strictly NO adding links to About
Me Editor.\n2. No PASTING images or HTML into the editor\n\nPLEASE
NOTE: About Me Editor Only works on: IE5.5+")
}
</script>
<script language="javascript" type="text/javascript">
<!--
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") ||
pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>
<link href="css/style.css" rel="stylesheet" type="text/css"></head>
<body OnLoad="Init();">

<SCRIPT LANGUAGE="JavaScript" src="js/editor.js"></SCRIPT>

<SCRIPT LANGUAGE="JavaScript" src="js/fadeitb.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="js/chgimg.js"></SCRIPT>
<BODY bgcolor="#B6B8F8" topmargin="0" leftmargin="0">
<table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><img src="img/nm_7.gif" width="20"
height="97"></td>
<td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="402"><img src="img/logo.gif" width="402"
height="59"></td>
<td align="right" valign="bottom"
background="img/top_bg.gif"><table border="0" cellspacing="3"
cellpadding="0">

<form name="counter">
<tr>
<td align="right"><img src="img/ttl_used.gif" width="58"
height="12"></td>
<td><input type="text" class="inp2" onfocus="blur()"
size="7" name="countup"></td>
</tr>
<tr>
<td align="right"><img src="img/ttl_left.gif" width="52"
height="12"></td>
<td><input type="text" class="inp2" onfocus="blur()"
size="7" name="countdown"></td>
</tr>

</form>
</table></td>
<td width="25"><img src="img/top_6.gif" width="25"
height="59"></td>
</tr>
</table> <table width="100%" border="0" cellpadding="0"
cellspacing="0" background="img/top_mnu_bg.gif">
<tr>
<td height="38">
<a href="#" onClick='MessageEditor.document.execCommand("Bold");'
onmouseout="mnu('bold','b_b.gif')"
onmouseover="mnu('bold','b_b.gif')"><img src="img/m/b_b.gif"
name="bold" width="29" height="32" hspace="4" border="0" id="bold"
alt="Set Select Text to BOLD"></a>

<a href="#" onClick='MessageEditor.document.execCommand("Italic");'
onmouseout="mnu('italic','b_i.gif')"
onmouseover="mnu('italic','b_i.gif')"><img src="img/m/b_i.gif"
name="italic" width="29" height="32" border="0" id="italic" alt="Set
Select Text to ITALIC"></a>
<a href="#" onClick='MessageEditor.document.execCommand("Underline");'
onmouseout="mnu('underline','b_u.gif')"
onmouseover="mnu('underline','b_u.gif')"><img src="img/m/b_u.gif"
name="underline" width="29" height="32" hspace="4" border="0"
id="underline" alt="Set Select Text to UNDERLINE"></a>
<a href="javascript:forecolor()"
onClick="MessageEditor.document.execCommand('ForeColor');"
onmouseout="mnu('color','b_color.gif')"
onmouseover="mnu('color','b_color.gif')"><img src="img/m/b_color.gif"
name="color" width="29" height="32" hspace="4" border="0" id="color"
alt="Set Font Colour"></a>
<a href="javascript:backcolor()"
onClick='MessageEditor.document.execCommand("BackColor");'
onmouseout="mnu('highlight','b_highlight.gif')"
onmouseover="mnu('highlight','b_highlight.gif')"><img
src="img/m/b_highlight.gif" name="highlight" width="29" height="32"
hspace="4" border="0" id="highlight" alt="Set Font Highlight"></a>
<a href="#" onClick='MessageEditor.document.execCommand("JustifyLeft");'
onmouseout="mnu('left','b_left.gif')"
onmouseover="mnu('left','b_left.gif')"><img src="img/m/b_left.gif"
name="left" width="29" height="32" hspace="4" border="0" id="left"
alt="Set Selected to LEFT"></a>
<a href="#" onClick='MessageEditor.document.execCommand("JustifyCenter");'
onmouseout="mnu('center','b_center.gif')"
onmouseover="mnu('center','b_center.gif')"><img
src="img/m/b_center.gif" name="center" width="29" height="32"
border="0" id="center" alt="Set Selected to CENTER"></a>
<a href="#" onClick='MessageEditor.document.execCommand("JustifyRight");'
onmouseout="mnu('right','b_right.gif')"
onmouseover="mnu('right','b_right.gif')"><img src="img/m/b_right.gif"
name="right" width="29" height="32" hspace="4" border="0" id="right"
alt="Set Selected to RIGHT"></a>
<a href="#" onClick="javascript:line()"
onmouseout="mnu('hr','b_hr.gif')"
onmouseover="mnu('hr','b_hr.gif')"><img src="img/m/b_hr.gif" name="hr"
width="29" height="32" hspace="4" border="0" id="hr" alt="Add Web
Break"></a></td>
<td><select name="FontFace" class="inp"
OnChange='MessageEditor.document.execCommand("FontName",false,this.options[this.selectedIndex].value)'>


<option value="Arial" SELECTED>Arial </option>
<option value="Arial Black">Arial Black </option>
<option value="Comic Sans MS">Comic Sans MS </option>
<option value="Courier">Courier </option>
<option value="Garamond">Garamond </option>
<option value="Lucida Handwriting">Handwriting </option>
<option value="Tahoma">Tahoma </option>
<option value="Times">Times </option>

<option value="Verdana">Verdana </option>

</select></td>
<td><select name="FontSize" class="inp"
OnChange='MessageEditor.document.execCommand("FontSize",false,this.options[this.selectedIndex].value)'>

<option SELECTED>Font Size</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>

<option value="5">5</option>
</select></td>
</tr>
</table></td>
<td width="62"><img src="img/nm_9.gif" width="62"
height="97"></td>
</tr>
<tr>
<td rowspan="2"><img src="img/mn_4.gif" width="20"
height="388"></td>
<td align="center" valign="middle"><iframe name="MessageEditor"
onblur="count(5000)" onafterupdate="count(5000)"
oncontrolselect="count(5000)" height="362" width="670" scrolling="yes"
border="2" frameborder="1" src="edit.php?id=">Your browser does not
support inline frames or is currently configured not to display inline
frames.</iframe></td>

<td rowspan="2"><img src="img/mn_6.gif" width="62"
height="388"></td>
</tr>
<tr>
<td height="23" align="center" background="img/row_bg.gif"><a
href="#" onClick="javascript:preview()"
onmouseout="mnu('preview','b_preview.gif')"
onmouseover="mnu('preview','b_preview.gif')"><img id="preview"
src="img/m/b_preview.gif" width="98" height="22" border="0"></a></td>
</tr>
<tr>
<td><img src="img/mn_1.gif" width="20" height="65"></td>
<td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
<form method=POST name="submitform" action="index.php?id=">

<input type="hidden" name="editresult" value="">
<tr>
<td background="img/top_mnu_bg.gif"><a
href="javascript:marquee()" onmouseout="mnu('txt','add_txt.gif')"
onmouseover="mnu('txt','add_txt.gif')"><img id="txt"
src="img/m/add_txt.gif" width="131" height="38" border="0"></a>


<a href="../images/m-icons/index.php"
onclick="NewWindow(this.href,'pop','420','450','no','center');return
false" onmouseout="mnu('img','add_img.gif')"
onmouseover="mnu('img','add_img.gif')">



<img src="img/m/add_img.gif" name="img" width="147" height="38"
border="0" id="img"></a><img src="img/hsep.gif" width="2"
height="38"></td><td align="right"
background="img/top_mnu_bg.gif"><input type="image"
src="img/m/b_save.gif" width="129" height="32" hspace="20" border="0"
onClick="return saveme()"></td>
</tr>
<tr>
<td background="img/bt_bg.gif"><img src="img/bt_4.gif"
width="21" height="27"></td>

<td align="right" background="img/bt_bg.gif"><img
src="img/bt_6.gif" width="50" height="27"></td>
</tr>
</form>
</table></td>
<td><img src="img/nm_3.gif" width="62" height="65"></td>
</tr>
</table>
<!-- End Table -->

<Textarea name="MessageBody" STYLE="visibility:hidden;" rows="1"
cols="20"></textarea>
<iframe name="keepalive" width="1" height="1" src="refresh.html"
scrolling="no"></iframe>

</BODY>
</HTML>


I dont think the "MessageEditor" code is actually there though, is it?
Is this a default function for internet explorer users and if so, will
it be implemented for mozilla?
 
C

Colin McKinnon

George spilled the following:
The webmaster told me this was because mozilla was not "up to date"
with Internet Explorer with Javascript.

Here is the code from the offending page...
I dont think the "MessageEditor" code is actually there though, is it?
Is this a default function for internet explorer users and if so, will
it be implemented for mozilla?

George, you've got way too much time on your hands!

MSIE has built-in functionality for WYSI(almost)WYG editing, which has been
around for a couple of versions (but does not appear in any standards
publication - which may have legal implications for how they promote the
service).

Mozilla seems to be going in a different direction with editable divs.

If you write websites and want to please most of the people / most of the
time, try FCKeditor (works on MS-IE, Mozilla - don't know about
Opera/Konqueror/Safari et al.)

C.
 
G

George Reynolds

wow. we have progress...

Im ahead of you :) we have already started to code our new editor which
will work on all browsers :) We code our own editors as most editors are
stand alone apps which would be tricky to use on LIM, and add to our own
templates :)

Im hoping our new editor should be up by the end of this month :)

Webby
 
G

George Reynolds

Cool, thanks for the information. I have forwarded it to the webmaster.
I am in the process of making a website, but I am trying at every
possible stage to make it compatible on ALL browsers. I dont intend to
use anything as complicated as that though, I dont need it.


I use linux, so I cant use IE and therefore cannot use this "message
editor" :( I was right though, about it being an IE only thing. Netscape
were the guys who invented the Javascript, it really sucks, that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top