[Javascript] JSpell implementation help.

John Warner john at jwarner.com
Wed Mar 1 09:46:48 CST 2006


Ouch, does it push the dictionary out to the client or is this server
side? Can't speak for your users, but I'd rather take my chances with my
poor typing and spelling skills then have you push a dictionary down to
me every time I visit your form...
 
John Warner

-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of
Roger.Espiritu at MAIL.CUNY.EDU
Sent: Wednesday, March 01, 2006 9:26 AM
To: javascript at LaTech.edu
Subject: [Javascript] JSpell implementation help.



I am trying to implement a JSpell (spellchecker product script from
Soltions Cafe: http://www.thesolutioncafe.com/), to check individual
textboxes for spelling. Before I want to purchase the product from
"Solutions Cafe". I want to have one button image per textbox that
checks their specified textbox.

I've downloaded and tested their JSpell Trial version on my local test
server. The way how JSpell works is that with a button, it checks all
textboxes simulateously. I basically wanted one button per text field.
The folks at Jspell said yes it works and they gave me this code to use
to check for individual textboxes using it's own proprietary image
button (Sample 2 below). I've tested it but I can't get it to work. What
only works for me is with a single button, it checks ALL fields within
the form. 

Can someone help me correctly rewrite the script for either samples
below to make this happen. I only know very basic Javascripting. 

Sample 1: This sample does work. (with one button checking all
textfields): 
----------start------------ 
<html> 
<head> 
<script language="JavaScript"
src="http://127.0.0.1/jspellhtml2k4/jspell.js"></script> 
<script language="JavaScript"> 
<!-- 
function getSpellCheckArray() { 
        var fieldsToCheck=new Array(); 

        // make sure to enclose form/field object reference in quotes! 
 
fieldsToCheck[fieldsToCheck.length]='document.forms["xlog"].xlog'; 
        return fieldsToCheck; 
} 
var language; 

//--> 
</script> 

</head> 

<body> 
<form method="POST" name="xlog"> 

<textarea cols="10" rows="10" name="xlog">           
</textarea> 
<img  src="../q/img/nav_abc.gif" width="28" height="29" border="0"
value="Spell Check" onClick="spellcheck()" alt="Spell Check"> 

</FORM> 

</body> 
</html> 
-------end--------- 

Sample 2: This is what the folks at solutionscafe gave with a button per
textbox... but it doesn't work. I get errors in return. 
----------start------------ 
<html> 
<head> 

<script language="JavaScript"
src="http://127.0.0.1/jspellhtml2k4/jspell.js"></script> 

<SCRIPT type="text/javascript" language="JavaScript"> 
<!-- 
function getSpellCheckArray() { 
var spellCheckArray=new Array(); 
return spellCheckArray; 
} 
//--> 
</SCRIPT> 

<title>JSpell Test File</title> 
</head> 

<body> 
<form method="POST" enablecab="No" name="scope"> 

<textarea cols="20" rows="20" name="log"></textarea>           

<img src="../q/img/nav_abc.gif" onClick="spellCheckArray=new Array();
spellCheckArray[0]=\"forms[scope].log"; spellcheck(); return false;"> 

<textarea cols="20" rows="20" name="log2"></textarea>   

<img src="../q/img/doc.gif" onClick="spellCheckArray=new Array();
spellCheckArray[0]=\"forms[scope].log2"; spellcheck(); return false;"> 

</form> 
</body> 
</html> 
-----------------end-------------- 

Help! 

-Roger 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060301/738db2c3/attachment.htm>


More information about the Javascript mailing list