Script putting fractions instead of ABCDEF

Running Acrobat Standard X.
I have a little bit of Javascript which is pulling the initials from a full name in one form field and placing the persons initials into a textbox throughout my document.
My script works very well, except if there is a capital A,B,C,D,E, or F. In those instances it puts 1/2 for A, 1/4 for B, 3/4 for C, 1 for D, 2 for E, and 3 for F.
Jane Doe would become J.1. (The 1,2,and 3 are shown as exponents). If I replace event.value in my script with an app.alert everything shows correctly in the message box.
Can someone please help, starting to pull my hair out. Below is the script. NameC2 is my Full Name field. Thanks
function Intials(cString) {
return cString.replace(/\W*(\w)\w*/g, '$1.').toUpperCase()
} // end Initials function;
var cName = "NameC2";
event.value = "";
var oName = this.getField(cName);
if(oName ==  null) {
app.alert("Error accessing field \"" + cName + "\"", 0, 0);
} else {
event.value = Intials(oName.value); // set field value;

That's odd... What happens if you run this code from the JS console:
Intials("Jane Doe");
I'm getting "J.D." as the result...
On Wed, Oct 22, 2014 at 8:52 PM, mach1rcode <[email protected]>

Similar Messages

  • I need help resetting my iCloud email address. i have erased all y data to solve a bug problem. I re-entered my email incorrectly; putting hitmail instead hotmail.

    Please help. I had clitch on my iphone. i was advised to reset my phone to factory settings. I successfully erased all the data. when i came to restore the software and back up data on to my phone I accidentally put the wrong email address whilst setting up my iCloud account. Instead putting in hotmail i put hitmail. I've tried to edit the email address, but I'm unable to. I've tried to erase the data again but I'm prompted to turn of the 'find my iphone' app. i can't do this because it ask for apple I'd; which I can't access because I've entered the wrong email.
    Please help!!!!!!!!!!!!

    Force it into recovery mode and restore it again, as explained here: http://support.apple.com/kb/ht1808.  Then set it up again using the correct address.

  • Where to put aliases instead of in ~/.bashrc for systemwide effect?

    I'd like to make a systemwide alias instead of putting the alias in each users .bashrc file. Where should i put it?
    Thanks!

    The systemwide .bashrc file is located at /etc/bash.bashrc
    It also sources /etc/bash.bashrc.local, so I'd say the proper thing to do here is to create that file and put whatever you need to in there, so that upgrades that change /etc/bash.bashrc won't complain about a changed file.
    The previously mentioned /etc/profile.d/ should work just fine too.
    Last edited by leftylink (2010-06-11 02:46:42)

  • When formatting a date field in a where clause the template put dot instead of comma

    Hello to Headstart Workers !
    In a query find block the template construct a where clause, in some cases, and i dont know when the template is formatting a date field putting a dot instead of a comma.
    Ex.: to_date('19-01-2001'.'DD-MM-YYYY')
    Anybody knows why or where the template do this.
    Congratulations
    Nelson

    - We created it using the HS utilities.
    - "nls_numeric_character = ,.".
    - it onky happen when the field date is not the first field in the where clause.
    - i can see the problem just after pressing find button, already in the ls_block in last_query.
    - the find_query works normally but cannot edit any line in ls_block.
    Hope that i had helping
    Regards
    Nelson
    null

  • Why am i getting fractions instead of text on some webpages?

    i'm getting fractions/mathematical sentences instead of text of some webpages. after reading another post with a similar problem. i did what they said would solve the problem, getting rid of the fonts Helvetica Fractions and Times Phonetic. that didn't work.
    i got rid of those fonts. searched thru my hard drive to make sure there weren't other copies of those fonts on my system, but the fractions still show up on some webpages.
    i restarted after trashing the fonts and did a disk permissions repair. anything else i need to do?

    tom, i'll email you with a screen shot.
    It's helvetica fractions or something similar.
    when i went
    to the fontfinagler download site, the example of
    garbled text was different from what i am
    experiencing.
    That's irrelevant. The point is that your machine may still think you have helvetica fractions because it is still in the caches. Clean them.
    by the way, firefox works fine.
    This font substitution problem normally only affects Apple Cocoa apps like Safari, Mail, Address Book, etc.

  • Request: Hello World script for prime velocity scripting. (put command output in variable for parsing)

    Dears,
    For a customer I'd like to validate a number of thing on their devices, and take appropriate action is something is not right.
    P.I. has a scripting language called velocity that can be used in the configuration templates.
    I'm looking for a simple example of a velocity script, that shows how you can get the resulting text output of a command, executed on a device, in a script variable so you can parse its contents.
    If anyone has an idea how this can be done please let me know.
    Cheers,
    Michel

    Thanks for taking the time to point this out. We'll put it on the list to fix in a future release. (And apologies for the tardy response.)
    Kind regards,
    Davin.

  • SAP Script ~ Put Amount in words & amounts

    HI guys: Please help me... I have a requirement where the client wants to put the amount in words on a check sap script as follows:
    If the amount is 27,150.95 USD
    they want "27,150 DOLLARS AND 95 CENTS"
    this is a combination of amounts and words in the "amounts in words" window of the sap script
    please help
    thanks
    Brian

    Hi,
    In the window where the amount is displayed in words,
    add the following code:
    Script:
    Say you have the amt in &amt&
    /: DEFINE &DOLLARS& = SPACE
    /: DEFINE &CENTS& = SPACE
    /: PERFORM split_amount USING &AMT(T)&
    /:                                     CHANGING &DOLLARS&
    /:                                     CHANGING &CENTS&
    P &DOLLARS& Dollars &CENTS& Cents Only
    ( P can be any paragraph format you want to use.
      (T) in the AMT while passing will get your amount rid of thousand seperators)
    Code should be put as follows in the Routine program:
    DATA: amt(10) TYPE C, (Length specified should correspond to the total length of the amount field including the decimal)
               p_dollar(7) TYPE c,
               p_cents(2) TYPE c.
    FORM split_amount USING in_tab STRUCTURE itcsy
                                  CHANGING out_tab1 STRUCTURE itcsy
                                  CHANGING out_tab2 STRUCTURE itcsy.
    READ TABLE in_tab INDEX 1.
    MOVE in_tab-value TO amt.
    CHECK sy-subrc EQ 0.
        SPLIT amt AT '.' INTO p_dollar p_cents.
        IF sy-subrc NE 0.
           SPLIT amt AT ',' INTO p_dollar p_cents.
       ENDIF.  (We have two SPLIT cos we may either have dot OR comma for decimal notation. This will cover both the cases)
    READ TABLE out_tab1 INDEX 1.
    CHECK sy-subrc EQ 0.
       MOVE p_dollars INTO out_tab1-value.
       MODIFY out_tab INDEX sy-tabix.
    READ TABLE out_tab2 INDEX 1.
    CHECK sy-subrc EQ 0.
       MOVE p_cents INTO out_tab1-value.
       MODIFY out_tab INDEX sy-tabix.
    Plz let me know if you have questions.
    Thanks
    Geetha

  • How do I view shutter speed as fraction instead of decimal?

    Sometimes the shutter speed appears as a fraction, other times as a decimal. Is there a way to make it always appear as a fraction?

    tidysteve wrote:
    it is only on images (for me) of .3s, .4s, 5s and .6s ... the first and last ones are not a very "attractive" fraction (3/10s - 1/3.33333333333 and so on - or 6/10 - 1/1.6666666666667) ... second would better (1/2.5s) ... but i really can't understand the 1/2s not showing as fraction ...
    Looking again I've just seen this and also 1.6s.
    Out of interest I fired up 1.5.6 and an 1.5 Library and decimals were visible for half a second or slower - so 1.5.6 shows 1/3 instead of 0.33333...
    tidysteve wrote:
    it just might be how the camera records the info ... shrug
    ALL cameras, as far as I know, store the shutter speed in decimal form - computers don't generally like fractions.

  • EWM Opportunistic Cross Docking issue - Its put away instead of 2121 - Pick

    Hi
    We have checked all settings, configuration for Opportunistics cross docking - EWM (SCM) set up.
    Storage type search sequence, activity type, WPT etc
    But while performing following steps we are facing the issue :
    1: We create PO in ERP
    2: Inb delivery in ERP
    3: Read Inb del in EWM - PRDI
    4: Perform Follow on task - WT creation and SAVE
    5: Create Sales order and outb del in ERP
    6: Read the docu in SCM - EWM
    5: See MOnitor - for Inbound delivery status is Put away
    Outbound SHOULD HAVE BEEN 2121 (WPT) with PICK, but still Put away GR is already performed.
    Its 1021 instead of 2121 WPT..
    Any pointers please ?

    Jacob,
    Yes, I after I posted that message I retested and it worked as I expected.  The only downside is that any GR reversals for the production orders will go to COGI due to the fact that 901 no longer allows negative stocks, but this is not that big of a deal. 
    Thanks for confirming my thinking.
    Jeff

  • How do I script SWF files instead of JPG files in XML loader?

    I have a SWF loader (greensock.com platform) and a thumbnail image scroll underneath it made of small image buttons. Each image button has a link which loads a new SWF file into the SWF loader above. Here is the code for each button which loads the bigger SWF file into the loader above:
    Button3.addEventListener(MouseEvent.CLICK, Button3_PlayPopUp);
    function Button3_PlayPopUp(event:MouseEvent): void {
        //setting the sourceVar
        sourceVar="3.swf";
        //making the SWFLoader load
        //as setting the soureVar after the SWFLoader is created won't do anything unlesss
        //I also re-create the SWFLoader with the new sourceVar when the button is clicked
        loader_howToLoader2.url = sourceVar;
        loader_howToLoader2.load(true);
    Then I decided to load all button via XML loader. I followed the tutorial on XML loaders which deals with loading jpg images and assigning URL links to them in the following manner first in XML file:
    <image src="appThmb_imgs/appThmb_imgs117x175/A-illuminatorUpLit_117x175.jpg" title="UpDownGlowingVase" url="http://www.888acolyte.com"/>
    and then in AS3 like this:
    var xmlLoader:URLLoader = new URLLoader();
    thisOne.link = imageList[item].attribute("url");
    function clickScrollerItem(e:MouseEvent):void {
    //trace("clicked item " + e.currentTarget.itemNum + " - visit url: " + e.currentTarget.link);
    var urlRequest:URLRequest = new URLRequest(e.currentTarget.link);
    try {
    navigateToURL(urlRequest);
    catch (e:Error) {
    // handle error here
    trace(e);
    My question is: How do I apply the code to each individual small thumbnail button to load a bigger image into the SWF loader above? Do I have to add something to XML file or this way it will never work with jpg images? Can url in XML file set the source var (//setting the sourceVar), since they are all individual and then somehow apply the making SWL loader to load part (//making the SWFLoader load) as a standard somewhere in the AS3 code?

    O.K. Here is my COMPLETE function.
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    function LoadXML(e:Event):void {
        trace("xml load complete");
        xmlData = new XML(e.target.data);
        //trace(xmlData.image); //we'll see each image xml element listed in the output panel with this xmlList
        buildScroller(xmlData.image); //rather than trace the xmlList, we send it to our buildScroller function
    //build scroller from xml
    function buildScroller(imageList:XMLList):void{
        trace("build Scroller");
        //var scroller_x:int=0;
        for (var item:uint = 0; item<imageList.length();item++) {
            var thisOne:MovieClip = new MovieClip();
            //thisOne.img_width=imageList[item].attribute("width");
            //outline
            var blackBox:Sprite = new Sprite();
            blackBox.graphics.beginFill(0xFFFFFF);
            blackBox.graphics.drawRect(-1, -1, 86, 128);//-1,-1 places rectangle 1px left and up.86, 128 draws rectangle 1px wider on all sides of placed image dimenstions of 84x126
            thisOne.addChild(blackBox);
            //scroller_x += thisOne.img_width + 20;
            //var currentX = currentImageWidth+spaceBetween;//modified line to adjust variable thumb widths
            thisOne.x = (84 + padding) *item;//84 is the width of the loaded images and 15 (which was before paddign var) is the padding
            //thisOne.x = scroller_x;//modified line to adjust variable thumb widths
            thisOne.itemNum = item;
            thisOne.title = imageList[item].attribute("title");
            thisOne.link = imageList[item].attribute("url");
            thisOne.src = imageList[item].attribute("src");
            thisOne.alpha = 0;//makes all thumb images at alpha=0 before they are fully loaded
            //trace(thisOne.itemNum, thisOne.title, thisOne.link, thisOne.src);
            //Loading and Adding the Images
            //image container
            var thisThumb:MovieClip = new MovieClip();
            //add image
            var ldr:Loader = new Loader();
            //var url:String = imageList[item].attribute("src");
            var urlReq:URLRequest = new URLRequest(thisOne.src);
            trace("loading thumbnail "+item+" into Scroller: " + thisOne.src);//url
            ldr.load(urlReq);
            //assign event listeners for Loader
            ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler);//tells us when the loading is complete
            ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);//tells us if there are any typo errors when the loading is complete
            thisThumb.addChild(ldr);
            thisOne.addChild(thisThumb);
            //create listeners for this thumb
            thisOne.buttonMode = true;//makes boxes act as buttons
            thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);//makes boxes act as buttons
            thisOne.addEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);//traces the title when the mouse is over the bounding box in the Output Panel
            thisOne.addEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);//traces the title when the mouse is out the bounding box in the Output Panel
            //add item
            scroller.addChild(thisOne);
    But I am not sure if I expressed myself clearly. All what you have indicated happens. Images are being loaded and url strings are working. I can not figure out how to tweek the code so instead of url specified in xml file I can load swf image into the SWF loader on the same screen?

  • Some text in Safari appears as fractions instead of readable text

    On some web pages certain blocks of text appear as numerical fractions. When I go to the same web page in another browser, such as Camino, the text appears as it should. I have tried to change the font in Safari's preferences, but nothing seems to fix it. This seems to be a fairly recent problem happening on all our Macs and it seems to have started since we upgraded to OS X 10.4, or maybe even after one of the recent updates. Any help resolving this annoyance would be appreciated.
    Stetson

    Thanks All,
    actually, these machines are all running Suitcase to manage fonts, so I eliminated Helvetica Fractions from any of the suitcases and it resolved the issue. It's curious the problem only showed up in Safari and not Camaro, but I've learned not to question things once they are working properly!!
    Stetson

  • Sap Script - putting dynamic height value in box command

    Hello All,
    In SAP scirpt I have to display a table which might have variable number of line items. So in box command I cannot mention the height statically.
    Is it possible to specify that dynamically like by using a variable and incrementing it every time the element is called from the loop?
    Thanks
    Indrajit

    no in SAP-SCRIPT this aint possible. But you could do this in an external perform, and have your incremented value back, tho since a external perform is beeing called from the form, the box statement might already have been interpreted.
    this again would mean that this way wouldnt work as well then.

  • Solaris 9 - init.d scripts in bash instead of sh

    Hello,
    I have some init.d scripts which are written in bash and they are not working correctly on Solaris 9. I made some researches and it looks like "rc" scripts must be written in bourne shell syntax. Before rewriting my (long) scripts, I would like to ask whether or nit it is possible to "force" the execution of the scripts in bash.
    Thanks in advance for your help,
    Tex.

    SimonJM wrote:
    The system 'knows' when to use stop or start as the script will be called as the run level of the server changes (via the init command, server shutdown, reboot, restart, etc.).
    Your script will physically reside in /etc/init.d but will be referenced (via a link) from the /etc/rc?.d directories - where the ? equates to the run level: /etc/rc2.d for example. If the link starts with an S it is for starting and if it starts with a K it is fro Killing (shutting down). Standards state that teh S or K be followed by two numbers so that the order in which the scripts are executed can be controlled:
    ln -s /etc/init.d/myscript /etc/rc2.d/S34myscript
    as an example, and that will get the system to to append the start parameter on to the call when it enters run level 2 as part of a system startup.
    If you want to run it by hand just call the base script directly: /etc/init.d/myscript startWell .. the reason why the System "knows" it is the /etc/rc? script which contains this piece of code
         for f in /etc/rc3.d/S*; do
              if [ -s $f ]; then
                   case $f in
                        *.sh)     .      $f ;;
                        *)     /sbin/sh $f start ;;
                   esac
              fi
         doneSo yes, it will start all the scripts being linked from the /etc/rc3.d/ directory and here is the point where the system passes the "start" argument. What surprise me is the **.sh* case where the script is not executed but just sourced.
    Tex

  • AppleScript problems after last security update

    I have to do most of my work on the Mac by speech input, due to arthritis in my hands. This means I rely on AppleScript "programs" to give me short cuts which make life easier. After I installed Security Update 2007-4 I had to re-install some of these programs and found that a few of them no longer work. For example the script below, which should turn off automatic email checking. NB I use MailSmith - and this worked before the Security Update.
    tell application "Mailsmith"
    get «class AcAc»
    if result is true then
    set «class AcAc» to false
    end if
    end tell
    Now produces a box on the screen containing:
    "Applescript could not compile because
    4Can't set «class AcAC» to false. Access not
    allowed.." (sic)
    Someone tell me what's going on with this, please?
    Cheers,
    Dave

    The script is wrong. Where you see the word "class" in your script, put "property" instead. Now start up Mailsmith and try to recompile the script. It should work.
    Alternatively, rewrite the script like this:
    tell application "Mailsmith"
    get its auto checking enabled
    if result is true then
    set its auto checking enabled to false
    end if
    end tell
    The "its" is crucial for distinguishing a property from a class.

  • Browser problems after last security update

    In Safari and in Firefox I have been having random odd problems the past few days since doing all the auto security updates. For example, pdf links never load and therefore cannot be viewed. On bn.com, specifically, it keeps looping back to a "no results" screen no matter where I've been or where I'm going to. I'm hoping that one is just a bn.com problem, but it's disturbing that on more than one web site I am unable to click links I otherwise used to be able to and view, i.e. pdf links. Any clue?

    The script is wrong. Where you see the word "class" in your script, put "property" instead. Now start up Mailsmith and try to recompile the script. It should work.
    Alternatively, rewrite the script like this:
    tell application "Mailsmith"
    get its auto checking enabled
    if result is true then
    set its auto checking enabled to false
    end if
    end tell
    The "its" is crucial for distinguishing a property from a class.

Maybe you are looking for

  • Need help with error log

    Hello folks... I wish I knew what I was looking at here, hopefully someone can make sense of this for me? Yesterday I started up Flex Builder 3 and had an error.  All I could see was java this java that...so I reinstalled java, hoping that might do s

  • Official Lumia 720 price in Spain?

    I want to know the official price of the Lumia 720 in Spain so I can have a reference when Im going to buy it in the near future. Thanks! Solved! Go to Solution.

  • Problem in MB1c

    Hi, I am getting a peculiar problem in Development environment. when I am receiving goods through MB1c with movement type 521e it is showing the material document no. in the message but on checking in LX02 or MMBE there is no entry exsists.There is n

  • Is it BADI Problem ????

    hi, i guess may be i am missing something but pl. guys check it at ur end. i have done some coding in my PO BADI 'ZME_PROCESS_PO_CUST' in PROCESS_ITEM method, the check works fine it also give the said error (if any), but if i held my PO then it is s

  • Error message Box

    xfa.host.messageBox("Error!", "Hello world", 0, 0); This code in all lower versions of reader (upto version 7.0.9 ) would pop a message box with Hello world in the Title bar of the message box. the same code however in reader 8.1 shows Warning: javas