After searching for clues on javascript on the Remedy KB site, I've
found a possible easy solution for my version of mid-tier, however, it
doesn't seem to work.  Am I doing something wrong?
 
Their solution:
Add an active link, firing on Window Loaded, which performs a single
run-process action:

javascript:document.FormFields.F<FID>.maxLength=<value>

..where <FID> is the database fieldId of the related character field,
and <value> is the maximum length of text allowed to be typed in the
field.

My version of this is:
 
javascript:document.FormFields.F8.maxLength=254
 
When I put this in place on my dev environment, there is no hard stop.
Am I missing something?
 
ARS 5.1.2 p 1313
MidTier 5.1.2 p 1388
 
Thanks,
Bruce
 
========================================================================
=====================
 
Shawn,
 
I've never done this before with version 5.1.2.  I'm guessing that I
would add the script directly to the web form via the Insert > Script
tool in the Admin Tool.  How do you reference fields within the form to
the script?  DB Name or Number?  Here is what I'm trying to do (I think
this script will work).
 
<script <http://december.com/html/4/element/script.html>
language="javascript1.2" type="text/javascript">
<!--
  var maxChars = 254;
  function charsleft()
  {
   theInputBox = document.getElementById('Sht_Description');
   theCountBox = document.getElementById('numCount');
   var currentChars = theInputBox.value.length;
   theCountBox.value = Math.max((maxChars - currentChars),0);
   if(currentChars > maxChars)
   {
    theInputBox.value = theInputBox.value.substring(0,maxChars);
   }
  }
-->
 </script>

 
The field references Sht_Description and numCount are the DB Names for
the short description field (which I am counting remaining spaces down
from 254) and the count result field which displays the remaining number
of spaces in the short description field.  Any advice is greatly
appreciated.
 
Thanks,
Bruce
 

  _____  

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Pierson, Shawn
Sent: Tuesday, March 27, 2007 2:04 PM
To: arslist@ARSLIST.ORG
Subject: Re: Character Counter


** 
If you're doing this on the mid tier, you may want to look at embedding
some Javascript onto the web view of your form instead.

        -----Original Message-----
        From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Bruce Scott
        Sent: Tuesday, March 27, 2007 3:40 PM
        To: arslist@ARSLIST.ORG
        Subject: Character Counter
        
        
        ** 
        List,
         
        Late in January, there was a discussion regarding using Interval
on an Active Link, for example in a counter to indicate the number of
spaces remaining in a field the user was typing in.  I have cut an
excerpt from that discussion around which my question revolves.  Has
anyone made this work on mid-tier?  If so, what version?
         
        Thank your for any help you can provide.
         
        

        Bruce Scott

        Application Developer - Remedy

        SSG, PetSMART, Inc.

        Office:  623.587.2340

        eMail:  [EMAIL PROTECTED]

         
        -----Original Message-----
        From: Action Request System discussion list(ARSList)
        [mailto:[EMAIL PROTECTED] On Behalf Of Doug Blair
        Sent: Wednesday, January 31, 2007 4:08 PM
        To: arslist@ARSLIST.ORG
        Subject: Re: Workflow
        
        All,
        
        Funny that this subject would come up like this, but just Monday
I got a
        request to build the three second interval counter to show
characters
        remaining. Works.
        
        I was concerned about performance too, so my test form has one
active link
        that calculates the remaining space in 16 character fields (set
fields X =
        255 - LENGTH($field$) every three seconds (one set field action,
16 fields).
        The integer fields have no label, disabled change flag, and is
displayed as
        text adjacent to each character field. If you watch closely
Aruser's CPU was
        up by a (one) percent when this window is open, but you're only
typing in
        one field at a time. No human-discernable pause, but the
workflow log gets
        pretty large...
        
        There's no client-server traffic in this, networking's not an
issue.
        
        Doug
         
  _____  

        The information contained in this electronic mail message,
including attachments, if any, is PetSmart confidential information.  It
is intended only for the use of the person(s) named above.  If the
reader of this message is not the intended recipient, or has received
this message in error, you are hereby notified that any review,
dissemination, distribution or copying of this communication is strictly
prohibited.  If you are not the intended recipient or have received this
message in error, please notify the sender via e-mail and promptly
delete the original message.
  _____  

        __20060125_______________________This posting was submitted with
HTML in it___ 

The information in this e-mail, and any files transmitted with it, is
intended for the exclusive use of the recipient(s) to which it is
addressed and may contain confidential, proprietary or privileged
information. If you are not an intended recipient, you have received
this transmission in error and any use, review, dissemination,
distribution, printing or copying of this information is strictly
prohibited. If you have received this e-mail in error, please notify the
sender immediately of the erroneous transmission by reply e-mail,
immediately delete this e-mail and all electronic copies of it from your
system and destroy any hard copies of it that you may have made. Thank
you.

__20060125_______________________This posting was submitted with HTML in
it___ 

#####################################################################################
The information contained in this electronic mail message, including 
attachments, if any, is PetSmart confidential information.  It is intended only 
for the use of the person(s) named above.  If the reader of this message is not 
the intended recipient, or has received this message in error, you are hereby 
notified that any review, dissemination, distribution or copying of this 
communication is strictly prohibited.  If you are not the intended recipient or 
have received this message in error, please notify the sender via e-mail and 
promptly delete the original message.
#####################################################################################

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

Reply via email to