htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Add-Ons:
Smiley extension problem on different servers


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


kloosie
New User

Jan 9, 2005, 2:15 PM

Post #1 of 1 (4536 views)
Shortcut
Smiley extension problem on different servers Can't Post

Hi all,

I'm using HTML area quite a while and recently I added the smiley extension which is posted here. First I installed everything on a Win XP IIS 5 server and the smiley extension works like charm. But now I moved all the code (didn't change anything) to a linux server (my Hosting provider) and I get an error when clicking the smiley icon. The error is:


Code
There are 1 errors in your script 
Line:14
Char:1
Code:0
Error:Object is expected



Line 14 says:


Code
__dlg_translate(i18n);


Entire source of insertsmiley.html:


Code
<html> 
<head>
<title>Insert Smiley</title>
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">

var InsertSmiley = window.opener.InsertSmiley;
var i18n = InsertSmiley.I18N;
var editor = null;
var param;

function Init() {
var totalsmileys = 16;
__dlg_translate(i18n);
__dlg_init();
param = window.dialogArguments;
editor = param['editor'];
window.resizeTo(400, 300);
var tbody = document.getElementById("smileytable");
var inum;
var trow;
for(var i = 1; i <= totalsmileys; i++) {
if((i - 1) % 4 == 0) {
trow = tbody.insertRow((i - 1) / 4);
}
// find new number to be found in smileys folder
inum = "";
if(i < 1000) {
if(i < 100) {
if(i < 10) {
inum = "000" + i;
} else {
inum = "00" + i;
}
} else {
inum = "0" + i;
}
}
else {
inum = i;
}
trow.insertCell((i - 1) % 4).innerHTML = "<a href=\"javascript:onOK('" + inum + "')\"><img style=\"border: 0px;\" alt=\"Smiley " + + i + "\" src=\"../smileys/" + inum + ".gif\" />";
}

document.body.onkeypress = __dlg_key_press;
};

function onCancel() {
__dlg_close(null);
return false;
};

function onOK(smileynum) {
var params = {};
params.imgURL = param.editor_url +"plugins/InsertSmiley/smileys/" + smileynum + ".gif";
__dlg_close(params);
return false;
};

function __dlg_key_press(ev) {
ev || (ev = window.event);
switch(ev.keyCode) {
case 13:
document.getElementById('bt_ok').click();
break;
case 27:
__dlg_close();
return false;
}
return true;
};
</script>
<style type="text/css">
html, body {
background: ButtonFace;
color: ButtonText;
font: 11px Tahoma,Verdana,sans-serif;
margin: 0px;
padding: 0px;
border-width: 0px;
}
body { padding: 5px; }
table { font: 11px Tahoma,Verdana,sans-serif; }
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
button { width: 70px; }
.space { padding: 2px; }
.title {
background: #ddf;
color: #000;
font-weight: bold;
font-size: 120%;
padding: 3px 10px;
margin-bottom: 10px;
border-bottom: 1px solid black;
letter-spacing: 2px;
}
.buttons {
border-top: 1px solid #999;
padding: 5px;
text-align: right;
height: 20px;
}
form { padding: 0px; margin: 0px; }
</style>
</head>
<body onload="Init()">
<form action="" method="get">
<div class="title" style="width: 360px;">Insert Smiley</div>
<div style="height: 175px; overflow:auto;" align="center">
<table style="border: 0; width: 370px;" id="smileytable" name="smileytable">
</table>
</div>
<div class="space"></div>
<div class="buttons">
<button type="button" onclick="return onCancel();">Cancel</button>
</div>
<div id="showselect" style="position:absolute; left:7px; top:75px; width:150px; z-index:100; visibility: visible; height: 13px; color: red;">
</div>
</form>
</body>
</html>



Is anyone familiar with this kind of error?

 
 
 


Search for (options)