Help with Java Script

Here's my problem:

I have a field that populate a 18 digit number.

I need a java script that will fill only the last 4 digits of the 18-digit number in a separte field.

Then F1 = 18 pre-filled numbers

F2 = last 4 F1

Can anyone help?

Thanks in advance for any help!

Use what the calculation script customized for F2:

var F1 = this.getField("F1").valueAsString;

Event.Value = f1.substring(f1.length-4);

Tags: Acrobat

Similar Questions

  • I need help with Java Script if/then statement

    I have absolutily no experience writing Java Script any help at all would be appreciated.

    I am working on a form in which I need a box for the person filling out the form click if they are a company be exempt from taxes. Well, obviously when they check the box I need field sales tax to change $ 0.00 total cost will only be calculated on the price of the items.

    Currently I use steps in the field of calculation for my Salestax.

    var k = this.getField ("SubTotal");

    K.value = Event.Value * 0.0825;

    Yet once, all possible assistance would be greatly appreciated.

    Tiffany

    Let's say the name of the box is "IsTaxExempt". Then you can use this code as the field of Salestax calcluation:

    If (this.getField("IsTaxExempt").value == "Off") {}

    var k = this.getField ("SubTotal");

    K.value = Event.Value * 0.0825;

    } else event.value = 0;

  • Need help with Java Script to perform a calculation in the form of Adobe Acrobat Pro 9

    I have a form (test) I created in Adobe Acrobat 9 Pro.

    I need help to create a custom JavaScript, so I can get the desired response.

    1) there are several questions in each group requiring a numeric response between 0-4

    2) there is a total set up field to calculate the sum of the responses of all of the above questions

    (3) the final "score" takes the answer in step 2 above and divide by the total possible response

    Any help to what Java Script I need to fill it would be greatly appreciated!

    I have attached a spreadsheet "" which shows more in detail as are the result of what I used in Excel to get the desired end formulas.

    Thanks in advance.

    Have you tried the "field is the average of:"?

  • Need help with java script

    I have a small script that changes the color of a button image that I use for a popup topic. It does this, of course, by exchanging the two images.

    The script works very well in HR overview and also when the htm page is opened directly in a browser (IE or Chrome).

    However, when I open the topic in the compiled help, the second image does not display.

    Those who work in HR overview. Who isn't in the compiled help.

    Here is the code:

    < a href = "javascript:BSSCPopup('..)". /MenuLocations/3DFace_menu_location.htm'); »

    "ID ="a1"style =" "position: relative;" > < img onmouseover = "this.src = '... /ClickButton - O.png'.

    onmouseout = "" This.src = '... ClickButton.png' ""

    "SRC ="... / clickbutton.png ".

    ALT = "Click for locations of menu and toolbar and related topics."

    border = "0" / >

    Any ideas?

    ~ Margaret Becker

    HI Margaret

    You should probably add the second image to luggage to its intended location. Because JavaScript must manage by exchanging images, RoboHelp is probably not aware of the second image.

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7, 8 or 9 in the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone blog

    RoboHelp EBooks

  • Need help with java script date

    Hi all

    Using Mac OS 10.6.8 and Adobe Acrobat 9.

    I am working on a form that has course date when you open the form.

    I have a field to enter an earlier date.

    If the effective date is = to or more than 3 years old (1095 days), then it will show a hidden field "sorry your registration has expired.

    If date enered is less than 3 years, then the field remains hidden.

    I have a field to display the result in days, I'm going to hide once the script works.

    Here is the shape right now.

    www.nixmailmac.com/register.PDF

    Any help would be appreciated.

    Ron has

    The code that I provided above is a compacted to if-then-else way. If you really want to, you can use this instead:

    If (event.value< 1095)="">

    getField("Enter_Field_Name_Here").display = display.hidden;

    } else {}

    getField("Enter_Field_Name_Here").display = display.visible;

    }

  • Problems with Java script

    Hi, I'm doing a site with dream weaver cs5.  I am instituting a slider, this cursor uses java script coding, I'm not familiar with Java script. Here is the site that I have problems with. Www.bussmanncomputers.net/Jara.

    What said Teodor, the jQuery library is not found as can be demonstrated when we follow him - http://www.bussmanncomputers.net/Jara/js/jquery.js - link you have placed in your document online.

    The only reason why there is a 404 error is because the file is not in the specified location, it has not been downloaded to the location of i.o.w..

  • Need help with a script (o - o8) *, see the Virgin if there is no

    Hi all what I need help with a script I can't find an example.

    I'm trying to subtract 2 numbers and then multiply this product. (o o8) * one but I just want to do the calculations if all fields have the numbers IE field o, o8 of field and field one.

    Thank you in advance. I was stuck on this days searching the Internet.

    Assuming you want to affect the outcome of this calculation in another text field, use this code as a custom field calculation script:

    var o = this.getField("o").valueAsString;
    var o8 = this.getField("o8").valueAsString;
    var a = this.getField("a").valueAsString;
    if (o!="" && o8!="" && a!="") event.value = (Number(o)-Number(o8))*Number(a);
    else event.value = "";
    
  • Problem with Java Script in my mail service

    I'm unable to access my email GMX account. Whenever I try, a rose windows opens at the top indicating that Java Script is required. However, when I check with the tolls, the enable JavaScript box is checked. I've deleted and reinstalled Firefox 10.0.1 two times with the same results. I can to my account via Internet Explorer and Safari without difficulty.

    Any ideas?

    Due to various difficulties, I reinstalled Windows 7. That solved the problem

  • Need help with a script customized for processing in Photoshop CS4 of images in batches. Really grateful for the help thereby.

    Hi people.

    So I have a boatload of pictures that I have to deal with as I'm moving off Ebay and open my own online store and the images that I have on Ebay, although excellent quality are not square, and unfortunately, the model that I use in Wordpress requires square photos.

    Basically, what I need is a script that I can use in batch mode, which will focus on the size of the image and change the canvas size to be square corresponding to the current long image side. Resize the image to 1600 square pixels and finally save for web in JPEG quality 60.

    Normally I would muddle my way through this trying to teach myself but I already do so much with this new project that I can't afford to pay developers for help that I would really appreciate if someone could help me with this script. I use Photoshop CS4 if it made a difference.

    Thanks much for any help you can offer.

    See you soon,.

    J

    A simple gesture can do that. What you need to do is that the action of lot.   With the help of Photoshop Image Processor script.  The Action is a two-step

    N ° 1). File menu > automate > fit Image.  In the dialog box Image Fit you assign Width and Height 1600 pixels.

    Step 2.) Menu Image > canvas size.  In the canvas size dialog box, you assign Width and Height 1600 Pixels.

    Record the action in some action with a name like 1600PxSquare

    Then use the file menu to Photoshop > Scripts > image processor. In the dialog to the Image Processor script. Select your image source folder. Set where you want your jpeg images. Set it to save jpeg files quality 6.  Set it to include your 1600PxSquare action.

    Step adjustment image resize your image to fit in a 1600 x 1600 pixels are while keeping image proportions of images. Portrait image will be high 1600px and landscape image will be 1600px wide.  The step size canvas will add the canvas to make the place of the image.  Portraits will have a border on the left and right images of landscape will be confined to the op and downs.

  • Help with a script

    Hi all

    I've been loving learning PowerCLI.

    I have problems, adding information to a script I had help with.  I have problems with the eastern line,

    Add-Member - InputObject $reportedvm - MemberType noteProperty-name GuestOs - value $VM. Guest.OSFullName

    I'll add the entire script bellows.  If someone could explain to me what I am doing wrong.  I get just white that colum in my CSV.  I guess that the $VM variable does not have property info I'm looking for.  I don't know if I have to do a join or something else to get this info.

    Here's the script as a whole.

    $reportedvms = New-Object System.Collections.ArrayList
    $vms = get-view - viewtype virtualmachine. Tri-objet-property {$_.} Config.Hardware.Device |  where {$_-is [VMware.Vim.VirtualEthernetCard]} |  Measure-object | {Select - ExpandProperty County}-descending
    {foreach ($vm to $vms)
    $reportedvm = new-Object PSObject
    Add-Member - Inputobject $reportedvm - MemberType noteProperty-Guest name-value $vm. Name
    Add-Member - InputObject $reportedvm - MemberType noteProperty-name-value of $($vm.) UUID Config.Uuid)
    Add-Member - InputObject $reportedvm - MemberType noteProperty-name GuestOs - value $VM. Guest.OSFullName
    Add-Member - InputObject $reportedvm - MemberType noteProperty-name ToolsVersion-value $VM. Config.Tools.ToolsVersion
    Add-Member - InputObject $reportedvm - MemberType noteProperty-name ToolsUpdate - value $VM. Guest.ToolsStatus
    $networkcards = $vm.guest.net
    $i = 0
    {foreach ($ntwkcard to $networkcards)
    Add-Member - InputObject $reportedvm - MemberType NoteProperty-Name "card$ {i}." Network"- value $ntwkcard.Network
    Add-Member - InputObject $reportedvm - MemberType NoteProperty-Name "card$ {i}." IpAddress"- value of $($ntwkcard.) IpAddress |? {$_ - like "*."} * »})
    $i ++
    }
    $reportedvms.add ($reportedvm) | Out-Null
    }
    $reportedvms | Export-Csv C:\temp\vm_nic_report.csv

    Try

    $VM. Guest.guestFullName

    instead.

    You're recovery VirtualMachine objects.

  • How can I link to pages in a selection tree / index level 2 with java script popup?

    I can do something unique popup level using the java script below (#1) and selections link to pages but to change a tree of selection index popup level 2 as below (#2), I can't seem to understand how to link to the pages. Any help much appreciated. Thank you

    1

    var itemIndex = app.popUpMenu("INTRODUCTION", "ALPHABET", "GRAMMAR", "NUMBERS", "DATES & TIME", "GETTING TO KNOW PEOPLE", "PHRASES FOR LEARNING", "DIRECTIONS & TRANSPORTATION", "DESCRIBING THE TRAIL", "DO'S & DON'TS", "EQUIPMENT", "FOOD", "INTRODUCING A VILLAGE", "CULTURE AND ETHNIC GROUPS", "HANDICRAFTS", "TEMPLES & MONKS", "AGRICULTURE", "ANIMAL HUSBANDRY", "SCHOOL & EDUCATION", "LEADING A TREK", "NATIONAL PROTECTED AREAS", "IDENTIFYING WILDLIFE", "PLANTS & FORESTS", "BOATS", "CAVES ", "HEALTH AND SAFETY"() "

    switch (itemIndex) {

    case 'INTRODUCTION' :

    this.pageNum = 1

    breaking

    case "ALPHABET" :

    this.pageNum = 2

    breaking

    case 'GRAMMAR' :

    this.pageNum = 5

    breaking

    case "NUMBERS" :

    this.pageNum = 30

    breaking

    case 'DATE & TIME' :

    this.pageNum = 35

    breaking

    case "GET to KNOW the PEOPLE" :

    this.pageNum = 42

    breaking

    case "PHRASES FOR LEARNING" :

    this.pageNum = 56

    breaking

    case 'DIRECTIONS & TRANSPORT' :

    this.pageNum = 59

    breaking

    case "DESCRIBING THE TRAIL" :

    this.pageNum = 63

    breaking

    case 'Things to do and not to do' :

    this.pageNum = 68

    breaking

    case "EQUIPMENT" :

    this.pageNum = 74

    breaking

    case 'FOOD' :

    this.pageNum = 83

    breaking

    case "INTRODUCE a VILLAGE" :

    this.pageNum = 96

    breaking

    case 'CULTURE AND ETHNIC GROUPS' :

    this.pageNum = 105

    breaking

    case "CRAFTS" :

    this.pageNum = 120

    breaking

    case "The TEMPLES and the MONKS" :

    this.pageNum = 126

    breaking

    case 'AGRICULTURE' :

    this.pageNum = 131

    breaking

    case "FARMING" :

    this.pageNum = 140

    breaking

    case "SCHOOL & EDUCATION" :

    this.pageNum = 145

    breaking

    case "LEADING a TREK" :

    this.pageNum = 151

    breaking

    case 'NATIONAL PROTECTED AREAS' :

    this.pageNum = 155

    breaking

    case "IDENTIFICATION of WILDLIFE" :

    this.pageNum = 161

    breaking

    case "PLANTS & FOREST" :

    this.pageNum = 169

    breaking

    case 'BOATS' :

    this.pageNum = 175

    breaking

    case "CELLARS" :

    this.pageNum = 178

    breaking

    case 'HEALTH AND SAFETY' :

    this.pageNum = 182

    breaking

    }

    2

    var aINTRODUCTION = ['INTRODUCTION', 'How to use this book', 'Format'];

    var aALPHABET is ["ALPHABET", 'Vowels', 'Sounds consonants'];.

    var itemIndex = app.popUpMenu (aINTRODUCTION aALPHABET);


    Thank you.


    It works exactly the same... itemIndex will bear the name of the selected

    order of the day.

  • help with resizing script

    I found an online script that turns pictures into a square (by increasing the size of the canvas on the short side to match the length of the long side) which is awesome, but I would like to make an extra step and I have no experience with script so I hope someone can help.

    now that my images are square, I want to put a maximum of 2500 x 2500 px size, I found scripts to set a resolution of a specific size, but I want to make sure to avoid is upsampling, so I want just any image is greater than 2500 x 2500 px down sample to 2500 x 2500 px

    all information on the code for this would be much appreciated.

    When I'm at the machine with the script that I currently use will be to paste it here in the meantime if you know something about the scaling of the images down, but preventing their intensification I could probably chimpanzee with the code I have and make it work.

    Something like this might work, you can change the ResampleMethod, however:

    top-down images of squares more 2500px up to 2500px.

    2012, use it at your own risk.

    #target photoshop

    If (app.documents.length > 0) {}

    myDocument = app.activeDocument;

    value of pixels;

    var originalRulerUnits = app.preferences.rulerUnits;

    app.preferences.rulerUnits = Units.PIXELS;

    get the dimensions;

    var theWidth = myDocument.width;

    var theHeight = myDocument.height;

    If (theWidth == theHeight) {}

    If {(theWidth > 2500)

    myDocument.resizeImage (2500, 2500, myDocument.resolution, ResampleMethod.BICUBICSHARPER)

    };

    }

    else {alert ('not square')};

    reset;

    app.preferences.rulerUnits = originalRulerUnits;

    };

  • Problem with java script

    Hello

    I created a form that contains a few simple calculations at the bottom. I have zero experience java script so any help is appreciated.

    The way the script is written right now gives me the error "the value entered does not match the format of the [Total] field.

    This is out of pocket expense claim form and I'm trying to have it display the total is due to the employee in the [Total] line. The form must take everything that is entered in the 'calculate.0; Calculate.1... "and multiply that number by 0.55 which is the rate for reimbursement of mileage. In the areas of 'numbers', the user will be able to enter the amounts for other expenses such as tolls and parking.

    The line [Total] must take each of the fields 'calculate' and multiply by 0.55, then add this total to values "numbers."

    Help, please!

    Thank you!!!

    (This.getField("calculate.0").value) = Event.Value * 0.55 +.

    (this.getField("calculate.1").value) * 0.55 +.

    (this.getField("calculate.2").value) * 0.55 +.

    (this.getField("calculate.3").value) * 0.55 +.

    (this.getField("calculate.4").value) * 0.55 +.

    (this.getField("calculate.5").value) * 0.55 +.

    (this.getField("calculate.6").value) * 0.55 +.

    (this.getField("calculate.8").value) * 0.55 +.

    (this.getField("calculate.9").value) * 0.55 +.

    (this.getField("calculate.10").value) * 0.55 +.

    (this.getField("calculate.11").value) * 0.55 +.

    (this.getField("calculate.12").value) * 0.55 +.

    (this.getField("calculate.13").value) * 0.55 +.

    parseInt (this.getField("numbers.0").value) +.

    parseInt (this.getField("numbers.0.0").value) +.

    parseInt (this.getField("numbers.0.1").value) +.

    parseInt (this.getField("numbers.0.1.0").value) +.

    parseInt (this.getField("numbers.0.1.0.0").value) +.

    parseInt (this.getField("numbers.0.1.0.1").value) +.

    parseInt (this.getField("numbers.0.1.0.1.2").value) +.

    parseInt (this.getField("numbers.0.1.0.1.3").value) +.

    parseInt (this.getField("numbers.0.1.0.1.4").value) +.

    parseInt (this.getField("numbers.0.1.0.1.5").value) +.

    parseInt (this.getField("numbers.0.1.0.1.6").value) +.

    parseInt (this.getField("numbers.0.1.0.1.7").value) +.

    parseInt (this.getField("numbers.0.1.0.1.8").value) +.

    parseInt (this.getField("numbers.0.1.0.1.9").value) +.

    parseInt (this.getField("numbers.0.1.0.1.10").value);

    This is because there is difference between 'Number as text' and 'numbers '. JavaScript uses the same operator '+', for the addition and concatenation. You must ensure that you have access to a certain number. You and use the constrictor 'Number' or the multiplicative identity. JavaScript has also tries to guess the action to use.

    Event.Value = (this.getField("calculate.0").value * 0.55) +.

    (this.getField("calculate.1").value * 0.55) +.

    (this.getField("calculate.2").value * 0.55) +.

    (this.getField("calculate.3").value * 0.55) +.

    (this.getField("calculate.4").value * 0.55) +.

    (this.getField("calculate.5").value * 0.55) +.

    (this.getField("calculate.6").value) * 0.55 +.

    (this.getField("calculate.8").value * 0.55) +.

    (this.getField("calculate.9").value * 0.55) +.

    (this.getField("calculate.10").value * 0.55) +.

    (this.getField("calculate.11").value * 0.55) +.

    (this.getField("calculate.12").value * 0.55) +.

    (this.getField("calculate.13").value * 0.55) +.

    Number (this.getField("Numbers.0").value).

    Number (this.getField("Numbers.0.0").value).

    Number (his.getField("Numbers.0.1").value).

    Number (this.getField("Numbers.0.1.0").value).

    Number (this.getField("Numbers.0.1.0.0").value).

    Number (this.getField("Numbers.0.1.0.1").value).

    Number (this.getField("Numbers.0.1.0.1.2").value).

    Number (this.getField("Numbers.0.1.0.1.3").value).

    Number (this.getField("Numbers.0.1.0.1.4").value).

    (1 * this.getField("numbers.0.1.0.1.5").value) +.

    (1 * this.getField("numbers.0.1.0.1.6").value) +.

    (1 * this.getField("numbers.0.1.0.1.7").value) +.

    (1 * this.getField("numbers.0.1.0.1.8").value) +.

    (1 * this.getField("numbers.0.1.0.1.9").value) +.

    (1 * this.getField("numbers.0.1.0.1.10").value);

  • Can someone help with the scripts on this file?

    Hi, I hope someone with a bigger brain can help me here.

    I have an existing Flash CS3 file that makes up the result to http://www.infusion-set.com/Flash/eLearning/Inset30/inset30_eguide.html .

    The customer asked if I could add an extra tab at the top after that 'group' called 'Contact us' with link to an additional page. The design was done in ActionScript 2 with references to XML files for dynamic content because it has been done in other languages.

    I modified the XML file with the correct references to a new page and a .swf file that accompanies it to play in the field of animation.

    I tried a .fla version where I duplicated one of the existing tabs script, changed the XML references and changed the variables if necessary to "con or"Con"(which is to reach us). Unfortunately, he made the menu tab go completely off the page and was patently false in some way.

    Can someone give me a clue as to what to change here on the original file that I am a novice with ActionScripts, so ask me.

    For reference, I have attached the HTML files with scripts of original file and my incorrect version. The chronology is 103 images with the scripts placed in frame 1 and 102

    Thank you.

    Garry

    The buttons are all created using the same library object (but MC), except for the code you have in the revised file does not call on it for the con button.

    You calling on something with a name of 'con' link, which tells me that a quick check is not - then it is undefined in the code when you try to use it.  I found this by using trace (newConBut._x); After its _x value was assigned, as I said, you should try.   So the first thing you want to do is to change the following line from...

    var newConBut = _root.attachMovie ("con", "conbut", _root.getNextHighestDepth ());

    TO

    var newConBut = _root.attachMovie ("but", "conbut", _root.getNextHighestDepth ());

    so that it uses the but MC who is used to this end in the library.  So, you want to correct the assignment _x of the buttons and I think that you had previously...

    newConBut._x = 650 - newConBut._width;
    newRecBut._x = newConBut._x - newRecBut._width;

    Here is a picture of what these changes (note, without the XML file, I had to finagle things just to work, then the labels of biutton are not what they will be)...

  • Need help with transformation Script

    Well I'm back for the 2nd time today. I would like to thank all those who helped me with my last issue. But now I have another question that I'm developing. Craig & Dan here me helped with 2 separate sending email responders based on questions in the form.

    You can view the form on this link:
    http://mswebsol.com/gaslockguarantee/creditapplication.cfm

    The problem I have right now, is that I don't get the results that I'm looking. Basically lets say you choose Yes to all 4 questions but on the 5th issue, you click on no. Well as it is now the script sends the answer by e-mail indicating your accepted. But what I'm trying to make, is that if you choose not to one of the questions you will automatically get an e-mail response that says you are not admitted.

    If I choose not to question, I'll get the answer correct email which is "your not accepted" to make it work for the first question. But if you choose Yes to the first question and no to the 2nd or any other question you will get the wrong answer that says "you are accepted."

    Here is the code

    < Cfif StructKeyExists(form,"Q1") >
    < cfif form. Q1 is 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q2") >
    < cfif form. Q2 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q3") >
    < cfif form. Q3 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q4") >
    < cfif form. Q4 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q5") >
    < cfif form. Q5 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >
    < / cfif >

    Any help would be greatly appreciated!

    Thanks to you all

    Derek Bess
    @ Coldfusion newbie

    If I understand you well, all your if/else logic boils down to a simple:
    (1) one of the answers is "No" - send 'rejected' by email
    (2) all the answers are "Yes" - email "accepted."

    I suggest you cfparam all default = 'no' on your action and answers
    the page, so that you don't have to keep control of structkeyexists:


    ...

    After that, all you need is:


    .. .send 'rejected' code email here...

    .. .send 'admitted' code email here...

    HTH

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com/

Maybe you are looking for

  • Why is there a yellow triangle with a black exclamation point on my website address

    Hello Sometimes I have a yellow triangle with a black exclamation point on the address bar of my site Web www.blackboxinsurancereviews.com can someone tell me what this means and what I can about this please? Thank you Iain McaSween

  • Firefox adds the extension jpeg for jpg images

    Whenever I have save an image through Firefox for Android, it adds an extension of JPEG, resulting in the FILENAME argument. JPG. JPEG. Since most Android applications don't recognize JPEG, I have to go into a file manager and rename the JPEG in JPG,

  • Hp15: videos don't show

    I can't see the videos when they play, for example, when I am on youtube and abc of the mouse. I don't know abot computers a lot so I'm lost!

  • Need for a versatile to pass data to the chart

    Hello I have a sub - vi that performs data analyses. I pulled out the results through a def type. I want that this type def to include data necessary to plot the results on a XY Chart. My problem is that the data will sometimes contain only 1 and som

  • My ZV6000 keeps freezing. Maybe a fan problem?

    Hi, I just had time to try this laptop a few years back.  It has been stored and before that it had been used several times. It has been freezing * everything * time I use it.  The mouse hangs just in place and it is stuck.  I tried to do a fresh ins