[Ekit-info] How do I set ekit's contents on load from a hidden text field without getting an excepti
Brought to you by:
hexidec
|
From: Scott C. <sco...@mi...> - 2003-01-29 01:50:49
|
I changed the demo page to the following and I get a exception when I cop=
y text from the textbox to the editor. I'm using IE 5.5.4807.2300 with S=
un's Java 1.4.1.
Can anyone tell me how to get this to work seamlessly? What I need to be=
able to do is to pre-set the text from a hidden text field into the edit=
or when the editor is loaded.
Thanks!
Scott
<HTML>
<HEAD>
<TITLE>Ekit Applet Demo</TITLE>
</HEAD>
<BODY>
<FORM NAME=3D"EkitDemoForm">
<H1>Ekit Applet Demo</H1>
<BR>
<SCRIPT LANGUAGE=3D"JavaScript">
var _info =3D navigator.userAgent;
var _ns =3D false;
var _ie =3D (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 &&=
_info.indexOf("Windows 3.1") < 0);
</SCRIPT>
<SCRIPT LANGUAGE=3D"JavaScript1.1">
var _ns =3D (navigator.appName.indexOf("Netscape") >=3D 0 && ((_info.=
indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getP=
roperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) |=
| (_info.indexOf("Linux") > 0)));
</SCRIPT>
<SCRIPT LANGUAGE=3D"JavaScript">
if (_ie =3D=3D true) document.writeln('<OBJECT ID=3D"Ekit" class=
id=3D"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH=3D"500" HEIGHT=3D=
"400" codebase=3D"http://java.sun.com/products/plugin/1.3/jinstall-13-win=
32.cab#Version=3D1,3,0,0"><NOEMBED><XMP>');
else if (_ns =3D=3D true) document.writeln('<EMBED NAME=3D"Ekit" type=
=3D"application/x-java-applet;version=3D1.3" CODE=3D"com.hexidec.ekit.Eki=
tApplet.class" ARCHIVE=3D"ekitapplet.jar" WIDTH=3D"500" HEIGHT=3D"400" pl=
uginspage=3D"http://java.sun.com/products/plugin/1.3/plugin-install.html"=
><NOEMBED><XMP>');
</SCRIPT>
<APPLET CODEBASE=3D"." CODE=3D"com.hexidec.ekit.EkitApplet.class" ARCHIVE=
=3D"ekitapplet.jar" NAME=3D"Ekit" WIDTH=3D"500" HEIGHT=3D"400"></XMP>
=09<PARAM NAME=3D"codebase" VALUE=3D".">
=09<PARAM NAME=3D"code" VALUE=3D"com.hexidec.ekit.EkitApplet.class">
=09<PARAM NAME=3D"archive" VALUE=3D"ekitapplet.jar">
=09<PARAM NAME=3D"type" VALUE=3D"application/x-java-applet;version=3D1.3"=
>
=09<PARAM NAME=3D"scriptable" VALUE=3D"true">
=09<PARAM NAME=3D"DOCUMENT" VALUE=3D"<html><head></head><body><P><B>Embed=
ded Document</B></P><P>This is an <I>embedded</I> test parameter formatte=
d as an <U>HTML</U> document.</body></html>">
=09<PARAM NAME=3D"STYLESHEET" VALUE=3D"ekit.css">
=09<PARAM NAME=3D"LANGCODE" VALUE=3D"en">
=09<PARAM NAME=3D"LANGCOUNTRY" VALUE=3D"US">
=09<PARAM NAME=3D"TOOLBAR" VALUE=3D"true">
=09<PARAM NAME=3D"SOURCEVIEW" VALUE=3D"false">
=09<PARAM NAME=3D"EXCLUSIVE" VALUE=3D"true">
=09<PARAM NAME=3D"MENUICONS" VALUE=3D"true">
</APPLET>
</NOEMBED></EMBED></OBJECT>
<BR>
=09<SCRIPT LANGUAGE=3D"JavaScript">
=09=09function copyText()
=09=09{
=09=09=09document.EkitDemoForm.TextViewer.value =3D document.EkitDemoForm=
=2EEkit.getDocumentBody();
=09=09}
=09</SCRIPT>
=09<SCRIPT LANGUAGE=3D"JavaScript">
=09=09function copyHtml()
=09=09{
=09=09=09return document.EkitDemoForm.Ekit.setDocumentText(document.EkitD=
emoForm.TextViewer.value);
=09=09}
=09</SCRIPT>
=09<INPUT TYPE=3D"button" ONCLICK=3D"copyText()" VALUE=3D"copy to textare=
a">
=09<INPUT TYPE=3D"button" ONCLICK=3D"copyHtml()" VALUE=3D"copy from texta=
rea">
=09<BR>
<TEXTAREA NAME=3D"TextViewer" COLS=3D"80" ROWS=3D"20"></TEXTAREA>
</FORM>
</BODY>
</HTML>
|