Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2013
    Rep Power

    Question JAVA rookie needs help with code

    Like the title says I'm a JAVA (or any PC language) rookie and am hoping I can pick someones brain for advice. I have successfully "wrote" my first piece of code (OK I have taken parts of it from other places to make it work) to auto-populate a date in a cell of a PDF form (code below). The problem I am having is trying to manipulate this code, or write a new code all together, that will add "X" amount of days to the date, for argument sake lets say 3 days.

    Before anyone wants to jump down my throat and say "USE THE SEARCH FUNCTION", I did, and did find some stuff and even tried some of it. The rest of it I either didn't understand (yet) or didn't think it would work for me. Please be advised that my total experience in trying to write any kind of code is less then 1 week so please be gentile with me, and if anyone wants to point me in the direction of some good tutorials/whatever form someone that is self teaching themselves it would be appreciated.

    The code that I am using (that actually works!): If it makes any difference I am creating the PDF forms in Bluebeam Extreme.

    function date() {
    var fld = this.getField("Date");
    fld.value = util.printd("mm/dd/yy",new Date());
    date(); // call my function

    I have tried to do "+3" and "Math:+3" in the code after dd & Date()) and also calling out function math() & function math: before and after function date() to no avail and some combinations of both plus a few other things. I am clearly missing something here.

    I am also trying to find information on how to write a code that would auto populate a cell in a PDF form that would take the first "X" amount of character of the file the form is saved under, say 5 characters. I am not even sure what function to use, or if one exists but thought I would throw this up here before I drive myself crazy trying to find it.

  2. #2
    Zyril is offline Senior Member
    Join Date
    Oct 2011
    Rep Power

    Default Re: JAVA rookie needs help with code

    Hi throttlejunkie,

    I don't think that you will find any answer on this forum for your question. This is a Java forum where you can ask questions as you progress whilst learning to program, but it feels as if you have started of in the wrong end.

    First of all, assume that you are programming what you are right now because you need it, otherwise I can't imagine why anyone would start off as you are doing. In my opinion, this is not a good way to learn programming.

    Secondly, the little code you have provided is not Java, but JavaScript. This is not a JS-forum, so once again you won't find your answer here.

    As to any rookie programmer, my tip is to start of with the absolute basics. Learn the fundamentals of the language you have decided to approach, and program stuff that you find in tutorials. After a while, you can adapt your knowledge and program what you want.

    Good luck,

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: JAVA rookie needs help with code

    Quote Originally Posted by Zyril View Post
    Secondly, the little code you have provided is not Java, but JavaScript. This is not a JS-forum
    Agreed. I'm closing this thread as off topic and it will be removed later.

    throttlejunkie, if you have a Java question, feel free to start a new thread. But beofre you do that, go through the Forum Rules, particularly the third paragraph.


    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Aeneas, the Rookie Wannabe
    By AeneasTroy in forum Introductions
    Replies: 1
    Last Post: 10-05-2012, 10:56 AM
  2. Helping a rookie with coding!
    By abravo227 in forum New To Java
    Replies: 14
    Last Post: 04-23-2012, 04:03 AM
  3. Replies: 16
    Last Post: 01-31-2012, 08:36 PM
  4. Replies: 0
    Last Post: 02-21-2011, 11:50 AM
  5. New rookie
    By JAdeline in forum Introductions
    Replies: 2
    Last Post: 08-19-2008, 09:09 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