Programming

Programming Questions? Ask a Programmer for Answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

Programming

I am creating a custom calculation script in adobe form

Customer Question
I am creating a custom...
I am creating a custom calculation script in adobe for a form field to calculate +14 days from "today". I have the form correctly auto populating on opening todays day. Heres where it gets whacky. The customer wants a drop down menu with 2 options. Today +14 and Today +180. I cant get it to work with only 1 (+14) nut not both. OR is there a script i can run where the user enters the # ***** days (14 0r 180) and another field enters the correct date?
(function () {
// Get date from field
var v = getField("Today").value;
if (v) {
// Convert string to date
var d = util.scand('mm/dd/yyyy', v);
// Add 180 days
d.setDate(d.getDate() + 180);
event.value = util.printd("mm/dd/yyyy", d);
} else {
// Blank field if no date entered
event.value = "";
}
})();
Submitted: 2 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Answered in 2 hours by:
1/5/2016
Programmer: Chris Baxter, Programming Tutor replied 2 years ago
Chris Baxter
Chris Baxter, Programming Tutor
Category: Programming
Satisfied Customers: 250
Experience: Completed BSIT concentration Software Engineering, tutored other students and classmates in Java and VB.net, C++, and Obj C.
Verified

Hello!

That code would take the following format:

var match = 'match3';

switch(match){

case 'match1': // break;

case 'match2': // do stuff here break;

case 'match3': console.log('test complete'); break; default: // do this if all else fails break;

}

Where the first variable "match3" = user selection from drop down **everything after "//" is comment

Switch(match) where match is the menu

{ <<dont forget these!

and each of the cases is a different menu selection, where code continues the run on the match and ignores the other switches. A lot like your }ELSE{ though in this case your calculate could be contained in the switch as the beginning of the code to be run.

Ask Your Own Programming Question
Customer reply replied 2 years ago
am i adding this code or replacing what I have, i dont see how this is calculating a date + 14 and +180 days to a menu item on the drop down.
Programmer: Chris Baxter, Programming Tutor replied 2 years ago

You are writing a code, if you want someone to write it for you it will be an additional charge. (Typically $50 USD is about average for most of the programmers here.) As for the code I gave, it is an example, in your code, you would want to put the "TODO" math after each of the case switches, yes repeat it. One case per menu selection, so your menu has two options +14 and +180

If your date field is filled in before the case (menu choice) is made, then EVERYTHING you currently have gets dropped down under a case. By choosing a choice in the menu, the user chooses which direction the program run will take. Case 1 = +14 calculate and display result, end program. Case 2= +180 calculate and display result, end program.

So everything var v onward and short of the final closing brackets gets contained in a case statement. The second statement is a copy of all this again, but with the changes for math.

Ask Your Own Programming Question
Ask Chris Baxter Your Own Question
Chris Baxter
Chris Baxter
Chris Baxter, Programming Tutor
Category: Programming
Satisfied Customers: 250
250 Satisfied Customers
Experience: Completed BSIT concentration Software Engineering, tutored other students and classmates in Java and VB.net, C++, and Obj C.

Chris Baxter is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,131 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

800 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
I need help with a spreadsheet formula. i need something
good morning, i need help with a spreadsheet formula. i need something like : if "a" is less then "b" then "b", if "a" is greater than "b" than "a" but not to exceed "c". … read more
The-PC-Guy
The-PC-Guy
Software Engineer
Bachelor's Degree
800 satisfied customers
Create a Visual Logic® program that will: • Create an array
Create a Visual Logic® program that will: • Create an array of people's first names. Using a loop, read the names from a text (.txt) file, and store each one into the array. The array should allow for… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
I got some problem on my poker hand program homework, C C++,
Hi! I got some problem on my poker hand program homework … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
Python, "-"-"-"-" \ \ / / \ \ / / \ \ "-"-"-"-" no
quot;-"-"-"-" \ \ / / \ \ / / \ \ "-"-"-"-" JA: What programs and versions are you using? Customer: Python JA: What is your ideal outcome? How can we solve this for you? Customer: "-"-"-"-" \ \ / / \ … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
I'm looking to hire someone to make a buzzfeed question
Hello, I'm looking to hire someone to make a buzzfeed question styled game in Python. … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
I have a wordpress site with go daddy and all the content
I have a wordpress site with go daddy and all the content and layout is gone I just got off the phone with godaddy and then said my site IP address was changed somehow and they just changed it back bu… read more
Jinsmn
Jinsmn
Systems Administrator
Diplom
1,260 satisfied customers
In this lab you will gain experience using all the concepts
In this lab you will gain experience using all the concepts we learned to this point, which include classes, methods, collections, and file input/output. Also, you will gain experience in team program… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
You should make a copy of this file in a convenient
You should make a copy of this file in a convenient directory on your M: drive. Then take a look at the file. Apart from the initial header row, each row describes a hill in the following format:Numbe… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
For LogicPro Only" The __________ keyword allows the
quot;For LogicPro Only" The __________ keyword allows the programmer to declare a set of constant values represented by identifiers.A. ref B. out C. enum D. returnPreceding a parameter with the ______… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
A magic square Customer Question A magic square is a 2-D
A magic square Customer Question A magic square is a 2-D list where the sum of each row is equal to the sum of each column and is equal to the sum of each of the two diagonals. Here is an example of a… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
I'm fairly new to programming and have been working on the
Hi, I'm fairly new to programming and have been working on the following array loop and I'm stuck on refactoring a for loop into a while loop: //write a for loop that takes each number, multiplies it … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
This is due 2/26/2017 @ 1100 PM Purpose To assess your
http://s000.tinyupload.com/index.php?file_id=09779842996875302048 This is due 2/26/2017 @ 1100 PM Purpose To assess your ability to apply the knowledge and skills developed up though week 7. Emphasis … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
Assignment 3 Please start with this source code. Write a
Assignment 3 Please start with this source code.Write a program that opens the following text file and processes it contents. The program should display the following per store: The total sales for ea… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
How do I get to calculates the total annual compensation of
How do I get to calculates the total annual compensation of the salesperson … read more
George Sibiya
George Sibiya
PhD
217 satisfied customers
I have a php yii application currently running on a server
I have a php yii application currently running on a server that I'd like to bring down to my computer. I started by installing yii on my mac computer by following this documentation (http://www.yiifra… read more
George Sibiya
George Sibiya
PhD
217 satisfied customers
You will need to create a console-based application whose
You will need to create a console-based application whose Main() method accepts ten integer values from the user and stores them in an array. Next, create a method that determines and displays the sma… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
OKPR1015211 POSTANSWER I have a .net software question. In
OKPR1015211 POSTANSWER I have a .net software question. In my .cs file I have commented out all the messages but when there is a error with the database connection I get a messagebox and it stops the … read more
Chris Baxter
Chris Baxter
Programming Tutor
250 satisfied customers
Assignment3_1.java - Write a console (all I/O via System.in
Assignment3_1.java - Write a console (all I/O via System.in and System.out) program that reads in two integer numbers and identifies if their sum is at least 3 times greater than their product. Print … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,131 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x