Java is the backend, JS is the front end (ie actually embedded on the page)..<br><br>There is an element id on the text area in question in pmwiki (thus I still have hope), but the jspspellcheck js is written for the concatenated names (ie element.formname.textareaname. <br>unfortunately there is no form name, but only text are name in pmwiki.<br><br>thanks, and thanks to anyone else who can take a look.<br><br>Seth<br><b><i>Crisses <crisses@kinhost.org></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>On Dec 15, 2006, at 6:58 PM, Seth Cherney wrote:<br><br>> I have been trying to integrate a java spell check into pmwiki, as <br>> I cannot access pspell/aspell on my hosted server.<br><br>Geek note: Java is not JavaScript. :) Java is by Sun Corporation, <br>and is a very very hefty undertaking. JavaScript is by Netscape Corp <br>I believe, and is meant for browser
scripting. The two came out <br>around the same time, and the names are very very confusing.<br><br>This is JavaScript. I started reading and went "Java! I can't help <br>with Java!!" :) Good thing I kept reading.<br><br>> My thought was only to mod PM's spellcheck.php to call the other js <br>> (it works on js in the browser as well. The spell checker I am <br>> trying to integrate is VERY easy to integrate (but I am no coder). <br>> It is sourceforge.net/projects/jspspellcheck, based on jazzy - and <br>> using word lists fo dicts (ie can make any language!).<br>><br>> I was dropping the whole thing into the pub directory, then trying <br>> to rewrite the spellcheck.php in the cookbook to point to it. <br>> There are a few syntax problems converting the js to php compatible <br>> js, and it tries to find the form name, but ther is no form name in <br>> pmwiki edit, just for the text area.<br><br>Ok -- actually this is
probably a make-or-break issue. When using <br>JavaScript to "script the DOM" (document object model or something) <br>it really needs to have a "name" on the "object" (in this case the <br>browser's text area) to point to.<br><br>The getElementById needs a CSS Id on the item you're accessing... <br>such as <textarea id="spellCheckme"> id tags are meant to be unique <br>identifiers on the page -- used only once. JavaScript takes <br>advantage of that fact, and uses it to target an item on the page.<br><br>> bellow is the file I have been trying to work on. the two lines <br>> with !!! are the ones I believe causing probs. someone with a <br>> little time could perhaps download jspspellcheck and give me some <br>> help?? I think it is very easy for someone with background (I am a <br>> theologian).<br><br>Sorry I don't have time to do that :/<br><br>> This will
add a "spell check" button to the GUI button bar, and<br>> link in the necessary spell checking scripts.<br>> #<script src='$PubDirUrl/speller/spellChecker.js'></script><br>> #<script type='text/javascript' ><br>> #function openSpellChecker() {<br>> # var textarea1 = document.getElementById('text');<br>> # var speller = new spellChecker( textarea1 );<br>> # speller.popUpUrl = '$PubDirUrl/speller/spellchecker.html';<br>> ## speller.openChecker();<br>> #}<br>> #</script><br>> */<br>><br>> # If we're not editing, then just exit.<br>> if ($action != 'edit') return;<br>> # Configure in the Speller Pages javascript code.<br>> $HTMLHeaderFmt[] = "<br>> <script src='$PubDirUrl/jspspellcheck/jspspellcheck/spellcheck- <br>> caller.js'></script><br>> <script
type='text/javascript' ><br>> function spellCheck(){<br>> var elements = new Array(0);<br>> !!! elements = document.getElementById('text');<br><br>Unless the id on the box is specifically "text" this will fail.<br><br>You can try getElementsByTagName and "textarea"?<br><br>elements = document.getElementsByTagName("textarea")<br>if(elements.length) {<br> !!! startSpellCheck('$PubDirUrl/jspspellcheck/', elements );<br>}<br>}<br></script><br><br>This is me guessing. I am a programmer, but I'm NOT a JavaScript <br>programmer.<br><br>it's either this, or find a way to add the id="text" to the HTML for <br>the textarea.<br><br>Crisses<br></blockquote><br></textarea></blockquote><p> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the
best spam protection around <br>http://mail.yahoo.com