Here's what we did to get it to work for multiple fields on the same form:

ARS 6.3 with MT 7.0 Patch 2

 

1) Using at least a 6.3 Admin Tool, on the form where we wanted to check the
spelling.
Go to the Form/Current View/Properties and the Appearance tab.
Add the following to the web header portion:
 
<script language="JavaScript"
src="http://servername/jspellhtml2k4/jspell.js";></script>
<script language="JavaScript">
<!--
var fieldsToCheck=new Array();

 

function ourSpellCheck(fieldName)
{
 fieldsToCheck=new Array();
 fieldsToCheck[fieldsToCheck.length]=fieldName;
 spellcheck();
}

 

function getSpellCheckArray() {
 return fieldsToCheck;
}
//-->
</script>

 

<form name = "Helpdesk">

 

2) On the web footer we added the following:

 

</form>

 

3) We created a button on our form for each field we wanted to check.

 

4) We added an active link for each field we wanted to check. 
The AL fires on click of the button created in 3 above.
Run If: $CLIENT-TYPE$ = 9
If Action: Run Process
Command Line: javascript
ourSpellCheck('document.yourformname.aridxxxxxxxxxxx')

 

 

 

NOTE: xxxxxxxxxx = the arid of the field you want to check

 

5) In JSpell, on the popup.html form, we added the following line:
body onload = window.focus()

 

 

 

HTH,

Tim

 

 

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Latter, Kris
Sent: Monday, February 11, 2008 1:30 PM
To: [email protected]
Subject: Configuring JSpell with Mid-Tier 7.0.1 Patch 6

 

** 

Hello,

 

I'm having an issue in trying to setup the JSpell program that has been
recommended on this list with: (Server, Admin Tool, and Mid-Tier all 7.0.1
Patch 6) in order to provide spell-checking on a specific form.

 

I am wondering if anyone else has successfully setup this program and
implemented it with Mid-Tier.

 

Here is what I have done so far:

 

-       Placed the jspellhtml2k4.war file into my Tomcat->webapps directory
and was able to test the spell checker successfully with
http://hostname/jspellhtml2k4/test.html

-       Loaded the form I wanted to implement spell-checking with in the
admin tool and clicked on EDIT WEB HEADER CONTENT and added the header
content specified by the help file:

 

<script language="JavaScript" src="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.getElementById('arid55012154')
"; 

return fieldsToCheck; 

} 

var language; 

//--></script> 

 

-       I also added the content specified to trigger the spell check in the
active link for the "spell check" button I have on the form.

 

My problem is that Mid-Tier is actually sticking the <SCRIPT
type="text/javascript" language="javascript"> (and so on) </SCRIPT>
information in the body of the document instead of the head of the document,
so my call to functions on the form from the activelink does not seem to be
working. Furthermore, the javascript in the activelink does not seem to
"see" the form it is running on.

For example, in the activelink, if I choose RUN PROCESS and type:

Javascript alert(document.getElementById('arid55012154').value)

I get "Object null"

 

arid55012154 is specified on the form itself when I view the form as an html
page, right-click, and go to VIEW SOURCE. 

There is a field, for example, that says <textarea id="arid55012154">

 

I'm hoping that someone can either tell me how to ensure that my <SCRIPT>
tags are being put into the <HEAD> section of the document instead of the
<BODY>, or give me other suggestions as to how to properly setup JSpell to
work with Remedy.

 

Any help would be appreciated.

Thanks,

Kris Latter
NAV CANADA 
280 Hunt Club Road 
Ottawa, ON. K1V 1C1 
(613)-248-6568
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

 

__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
html___ 


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to