htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
'Object expected' runtime error with 2.02 - plz help!


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.

 


jstolzen
Novice

Dec 14, 2002, 8:57 AM

Post #1 of 5 (4293 views)
Shortcut
'Object expected' runtime error with 2.02 - plz help! Can't Post

Hi, everyone..I am just now trying to install HTMLAREA for the first time (v2.02) and cannot get past an 'object expected' runtime error using IE 6 under WinME. While the example.html works fine, my app doesn't, and gets the error.

Not sure what is going on, so here's a code snippet. If anyone out there could help me out, I'd really appreciate it!

In my <head> section:

<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = ""; // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>

Calling from textarea:

<td width="72%">
<textarea name="myfield" rows="10" cols="60"></textarea>
<script language="JavaScript1.2">
alert('gets here OK');
editor_generate('myfield');
alert('never gets here');
</script>
</td>

Thanks for any help/ideas!

Jim


Benjamin
Staff


Dec 31, 2002, 2:02 PM

Post #2 of 5 (4233 views)
Shortcut
Re: [jstolzen] 'Object expected' runtime error with 2.02 - plz help! [In reply to] Can't Post

Hey Jim,

Sorry for missing your post; Strange problem. Your code seems fine - it runs perfectly well on my machine. Perhaps it's a specific browser problem... but you say example.html runs fine with the same browser? Hmmm. Could you perhaps reply with your whole file as an attachment, so I could try and recreate the problem here?
Ben
interactivetools.com


mikker
New User

Apr 1, 2003, 5:47 AM

Post #3 of 5 (3942 views)
Shortcut
Re: [Benjamin] 'Object expected' runtime error with 2.02 - plz help! [In reply to] Can't Post


In Reply To
Hey Jim,

Sorry for missing your post; Strange problem. Your code seems fine - it runs perfectly well on my machine. Perhaps it's a specific browser problem... but you say example.html runs fine with the same browser? Hmmm. Could you perhaps reply with your whole file as an attachment, so I could try and recreate the problem here?



I have exactly the same problem.

I've copied htmlarea to a folder under root called htmlarea.

Then I put a document in the root called htmlarea.html (attached), but when I view this page in my browser (IE 6.0.2800) I get a JavaScript-error : Object expected in line 24 char 3.
Attachments: htmlarea.html (0.92 KB)


mikker
New User

Apr 1, 2003, 6:06 AM

Post #4 of 5 (3942 views)
Shortcut
Re: [jstolzen] 'Object expected' runtime error with 2.02 - plz help! [In reply to] Can't Post

I've solved the problem:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>htmlArea-test</title>

<script language="Javascript1.2">
<!-- // load htmlarea
var _editor_url = "/htmlarea/"; // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<script src="' + _editor_url + 'editor.js"');
document.write(' language="Javascript1.2"></script>');
}
else{
document.write('<script>function editor_generate(){ return false; }</script>');
}
// -->
</script>
</head>
<body>

<script language="JavaScript1.2" defer>
editor_generate('testarea');
</script>

<textarea name="testarea" cols="120" rows="20"></textarea>

</body>
</html>


mikker
New User

Apr 1, 2003, 6:14 AM

Post #5 of 5 (3941 views)
Shortcut
Re: [mikker] 'Object expected' runtime error with 2.02 - plz help! [In reply to] Can't Post

This only works in version 2 NOT 3 ..... why?

/Mikker


In Reply To
I've solved the problem:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>htmlArea-test</title>

<script language="Javascript1.2">
<!-- // load htmlarea
var _editor_url = "/htmlarea/"; // URL to htmlArea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<script src="' + _editor_url + 'editor.js"');
document.write(' language="Javascript1.2"></script>');
}
else{
document.write('<script>function editor_generate(){ return false; }</script>');
}
// -->
</script>
</head>
<body>

<script language="JavaScript1.2" defer>
editor_generate('testarea');
</script>

<textarea name="testarea" cols="120" rows="20"></textarea>

</body>
</html>


 
 
 


Search for (options)