Results 1 to 4 of 4
  1. #1
    N00bTube is offline Member
    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Default Compare date and insert % calculation of value depending on result

    Having recently got Adobe Acrobat Pro I didnít expect to have to learn a new language, but there you go little did I know. Excel is easy compared to attempting JavaScript, but I guess I have to start somewhere.

    I have managed to muddle my way through to a degree but I am now at a point where I require to add a script to an Adobe Form.

    I wish to introduce a SURCHARGE of 10% to a SUBTOTAL value if the ordering DATE deadline has passed (as this will incur additional charges by us).

    The SUBTOTAL and DATE fields exist, the new field is SURCHARGE where the script will reside.

    I have the current system date inserted automatically on the form using:

    var f = this.getField("DATE");
    f.value = util.printd("dd/mmm/yyyy", new Date());

    In Excel its relatively easy using the (if : else) commands, but java is just beyond me. I would be grateful if one of you learníed ones could spare me some of your knowledge.

    CAPS - field names

    Thanks in advance

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    You might do better asking on a JavaScript forum. This one's for Java (a different language).

  3. #3
    N00bTube is offline Member
    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Default

    Well there you go, that says it all I wasn’t aware there was a difference, perhaps my mistake for saying JavaScript as opposed to Java and thanks for the pointer however I am advised that Adobe Forms uses Java or FormCalc, I guess the question remains.
    Last edited by N00bTube; 11-30-2010 at 07:48 PM.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by N00bTube View Post
    Well there you go, that says it all I wasnít aware there was a difference, perhaps my mistake for saying JavaScript as opposed to Java and thanks for the pointer however I am advised that Adobe Forms uses Java or FormCalc, I guess the question remains.
    Your question may remain, but it still is not a Java question. Period. Locking.

Similar Threads

  1. insert date
    By swamy4311 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-02-2010, 09:18 AM
  2. How to insert DATE into mysql using JSP?
    By sivakumar_sakam in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 12-27-2009, 07:52 PM
  3. Display nodes depending on date
    By jlund in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 12-18-2009, 11:47 AM
  4. Problem when insert Date to database(SQL)
    By hungleon88 in forum JDBC
    Replies: 6
    Last Post: 04-29-2009, 03:53 PM
  5. Compare date input to database with current date
    By hungleon88 in forum Advanced Java
    Replies: 2
    Last Post: 11-25-2008, 08:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •