This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes problem when integrating jspell with tinyMCE editor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "problem when integrating jspell with tinyMCE editor" Watch "problem when integrating jspell with tinyMCE editor" New topic
Author

problem when integrating jspell with tinyMCE editor

shyam shridhar
Ranch Hand

Joined: Sep 15, 2006
Posts: 31
Hi,

Recently I have started work to attach JSpell with tinymce for our whole site.

I have successfully attached it(JSpell) to some form(JSP pages) as well, those are working absolutely fine.

But I faced some difficulties while attaching JSpell to tinymce in the edit mode(when there is some value already exists in tiny textarea for user to update).

e.g on Edit Comment/Edit Employee/ Edit User form, description textarea field

I have fixed some of them but now problem coming in internet explorer only, on firefox browser all things are working fine.

Problem and Steps to get problem
---------------------------------
When I'm opening edit comment form first time it show me two alert box one after another which shows following messages respectively
1) "JSpell Not Intialized"
2) "JSpell AutoAttach: undefined"

after press OK for both alerts JSpell working fine in IE but We don't want these two alerts(How can I fix this?).

problem become worse when I refresh edit comment page
Then I received following error message.
----------------------------------------------------------
A Runtime Error has occurred.
Do you wish to Debug?

Line: 157
Error: Exception thrown and not caught
----------------------------------------------------------

When I'm debugging this js error then it throw me to following line of jspellEvolution.js
----------------------------------------------------------
>throw("JSpell - Error in getSpellCheckArray, Element '"+J7x[J4Y][1]+"' >Not Found.");
----------------------------------------------------------

Don't know why these problem coming only on Internet Explorer(Version 6 also tested in Version 7) but working fine in FireFox(Version 2,3).

At the end of this post is code of edit form which creating problem.

I'm desperately looking for your reply.

Please give me any hint

Thank you


EditForm.html
=============
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE></TITLE>

<META http-equiv=Content-type content="text/html; charset=utf-8">

<LINK media=all
href="editForm_files/new2.css" type=text/css rel=stylesheet><LINK media=all
href="editForm_files/section.css" type=text/css rel=stylesheet><LINK media=print
href="editForm_files/print.css" type=text/css
rel=stylesheet><!--[if lt IE 7]><LINK media=all href="editForm_files/ltie7.css"
type=text/css rel=stylesheet><![endif]--><!--[if lt IE 6]><link type="text/css" media="all" rel="stylesheet" href="css/ltie6.css" /><![endif]--><!--[if IE]>
<STYLE type=text/css media=print>@import url( css/print_IE.css );
</STYLE>
<LINK media=all href="editForm_files/ie.css" type=text/css rel=stylesheet><![endif]-->

<SCRIPT type=text/javascript>var imagepath = "img";</SCRIPT>

<SCRIPT src="editForm_files/mootools-release-1.11.js"
type=text/javascript></SCRIPT>

<SCRIPT src="editForm_files/tips.js" type=text/javascript></SCRIPT>

<SCRIPT src="editForm_files/functions.js" type=text/javascript></SCRIPT>

<SCRIPT src="" type=text/javascript></SCRIPT>

<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>

<BODY id=all-communities onload=jspellOnDemandCheck();>
<DIV id=container>

<DIV id=right_shadow>
<DIV id=bottom_curve_right>
<DIV id=bottom_curve_left>
<DIV id=nav>
<DIV class=inner>
<DIV class=tl></DIV>

<DIV class=padding>

<DIV id=main>

<DIV class=form id=columnmain>

<FORM action=/faq/edit-faq.do method=post encType=multipart/form-data>
<INPUT class=hidden type=hidden value="" name=formUrl>

<DIV id=jspell_tiny>

<DIV id=compose>

<DIV class=padding>



<LABEL for=subject>Question</LABEL>
<INPUT class=text id=subject value="sdfssd " name=subject>




<SCRIPT language=javascript src="editForm_files/jspellSettings.js"
type=text/javascript></SCRIPT>

<SCRIPT language=javascript src="editForm_files/jspellEvolution.js"
type=text/javascript></SCRIPT>

<SCRIPT language=javascript src="editForm_files/tiny_mce.js"
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
jspellRealtime=true;
jspellAutoAttach=true;
jspellShowOptionsMenu=true;
function getSpellCheckArray(){
var fieldsToCheck = new Array;
fieldsToCheck[0] = [document, 'entry_ifr'];
return fieldsToCheck;
};
</SCRIPT>

<DIV style="WIDTH: 98%"><TEXTAREA class=tall id=entry name=body rows=10 cols=60><p>Hey, sad skid staffed sods the wee stalked SD Cole scuds sodsdfsd</p>
<p>f sdf</p>
<p>sd</p>
<p>fsdf</p>
<p>&nbsp;</p>
<p>dsf</p>
<p>&nbsp;</p>
<p>sdf</p>
<p>sd</p>
<p>&nbsp;</p></TEXTAREA></DIV>
<SCRIPT type=text/javascript>
tinyMCE.init({
plugins : "csqimage,csqclean,csqlink,table,paste,emotions,preview,iespell" ,
mode : "textareas",
theme : "advanced",
document_base_url : "/",
theme_advanced_buttons1 : "bold,italic,underline,separator,bullist,numlist,outdent,indent,separator,image,separator,csqlink,unlink,separator,forecolor,backcolor,separator,embedcode,separator,undo,redo,emotions,pasteword,preview,iespell",
theme_advanced_buttons2 : "tablecontrols",
theme_advanced_buttons3 : "",
content_css : "tiny_mce_321/themes/advanced/skins/default/content.css, css/green_tinymce.css" ,
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom"
});
function postTinyMCEInit(){
setTimeout(jspellInit,500);
};
tinyMCE.init({
oninit : postTinyMCEInit()
});
</SCRIPT>


<DIV class=faq-type><LABEL>Faq Type</LABEL>
<DIV><INPUT class=radio type=radio CHECKED value=0
name=faqType> Member <INPUT type=hidden name=_faqType></DIV>
<DIV><INPUT class=radio type=radio value=1
name=faqType> Facilitator <INPUT type=hidden name=_faqType></DIV><EM
class=note-faq>Any file uploaded here will overwrite the existing file, leave
blank to preserve the current file.</EM> </DIV>


Download: <IMG <br /> > <A class=pdf <br /> <br /> href="http://localhost/faq/get-file.do?id=85769" <br /> target=_blank>word2007.docx | 9.77 KB

<LABEL for=file><INPUT
class=browse id=file type=file size=60 name=upload></LABEL>

<INPUT class="fright button" onclick=jspellDetach(); type=image
alt="Save and continue" src="editForm_files/btn-green-saveandcontinue.gif">
</DIV><!-- End of .padding -->
</DIV><!-- End of .compose -->
</DIV><!-- End of .jspell_tiny -->

<INPUT class=hidden type=hidden value=85769 name=id> </FORM></DIV><!-- End of .columnmain -->

<DIV id=columnright>
<DIV class=padding>
</DIV></DIV></DIV><!-- End of .main -->

<DIV class=common id=footer>
</DIV><!-- /#footer -->
</DIV><!-- End of .padding -->
</DIV><!-- /#right_shadow -->
</DIV><!-- /#bottom_curve_left -->
</DIV><!-- /#bottom_curve_right -->
</DIV><!-- /#container -->

<SCRIPT type=text/javascript>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</SCRIPT>

<SCRIPT type=text/javascript>
try {
var pageTracker = _gat._getTracker("UA-10182975-1");
pageTracker._trackPageview();
} catch(err) {}</SCRIPT>
</BODY></HTML>

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
When you post code please use code tags.

Have you contacted the tinyMCE or the jSpell people and see if they know of any issues?

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem when integrating jspell with tinyMCE editor
 
Similar Threads
Communicate with the server without a browser.
Is it possible to put a button inside autocomplete in jquery ui plugin?
document.forms[0].submit(); throws Invalid Argument in IE
Fieldset is not working
Fieldset is not working