Solved

Adobe  form dropdown menu with Java Script

Posted on 2013-11-05
5
444 Views
Last Modified: 2013-11-06
Hi I am new to Java
Need help with a dropdown menu, using JavaScript with this menu. The text that the user sees I only need part of the text to print, I need to hide the (D) and (E) from printing. Below is the script I am using
Thank you
// Place all prepopulation data into a single data structure
var DeptData = { "ALCOHOL & DRUG COUNSELING (D)":{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "30", 
                              TUITION: "15792",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "ALCOHOL & DRUG COUNSELING (E)":{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "37", 
                              TUITION: "15792",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },  
                 "DENTAL ASSISTANT (D)":{ ClockHours: "960",
                              CreditHours: "25.60",
                              Weeks: "30", 
                              TUITION: "16592",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "DENTAL ASSISTANT (E)":{ ClockHours: "960",
                              CreditHours: "25.60",
                              Weeks: "54", 
                              TUITION: "16592",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },  
                 "DIAGNOSTIC MEDICAL SONOGRAPHER (D)" :{ ClockHours: "2,388",
                              CreditHours: "63.68",
                              Weeks: "92", 
                              TUITION: "36782",
                              REGISTRATIONFEE: "100",
                              STRF: "18" },
                 "DIAGNOSTIC MEDICAL SONOGRAPHER (E)" :{ ClockHours: "2,388",
                              CreditHours: "63.68",
                              Weeks: "128", 
                              TUITION: "36782",
                              REGISTRATIONFEE: "100",
                              STRF: "18" },
                 "FITNESS TRAINER (D)":{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "30", 
                              TUITION: "15792",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "FITNESS TRAINER (E)":{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "43", 
                              TUITION: "15792",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "HOLISTIC MASSAGE THERAPY (D)" :{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "30", 
                              TUITION: "16592",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "MEDICAL ASSISTANT (D)" :{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "30", 
                              TUITION: "16592",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "MEDICAL ASSISTANT (E)" :{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "38", 
                              TUITION: "16592",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "MEDICAL BILLER (D)" :{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "30", 
                              TUITION: "16592",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "MEDICAL BILLER (E)" :{ ClockHours: "900",
                              CreditHours: "24.00",
                              Weeks: "38", 
                              TUITION: "16592",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "NURSE ASSISTANT (D)" :{ ClockHours: "182",
                              CreditHours: "4.85",
                              Weeks: "7", 
                              TUITION: "2404",
                              REGISTRATIONFEE: "100",
                              STRF: "1" },
                 "PHARMACY TECHNICIAN (D)" :{ ClockHours: "760",
                              CreditHours: "20.27",
                              Weeks: "32", 
                              TUITION: "16592",
                              REGISTRATIONFEE: "100",
                              STRF: "8" },
                 "SURGICAL TECHNOLOGY (D)" :{ ClockHours: "1620",
                              CreditHours: "43.20",
                              Weeks: "50", 
                              TUITION: "30785",
                              REGISTRATIONFEE: "100",
                              STRF: "15" }, 
                 "SURGICAL TECHNOLOGY (E)" :{ ClockHours: "1620",
                              CreditHours: "43.20",
                              Weeks: "62", 
                              TUITION: "30785",
                              REGISTRATIONFEE: "100",
                              STRF: "15" }}; 
function SetFieldValues(cDeptName)
{
  this.getField("ClockHours").value = DeptData[cDeptName].ClockHours;
  this.getField("CreditHours").value = DeptData[cDeptName].CreditHours;
  this.getField("Weeks").value = DeptData[cDeptName].Weeks;
  this.getField("TUITION").value = DeptData[cDeptName].TUITION;
  this.getField("REGISTRATIONFEE").value = DeptData[cDeptName].REGISTRATIONFEE;
  this.getField("STRF").value = DeptData[cDeptName].STRF;
}

if( event.willCommit )
{
   if(event.value == " ")
     this.resetForm(["ClockHours","CreditHours","Weeks","TUITION","REGISTRATIONFEE","STRF"]);
   else
     SetFieldValues(event.value);
}

Open in new window

0
Comment
Question by:genewc
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 39625900
I don't think we have all the information to help you yet. Can you please explain in a bit more detail what you want to accomplish. In which context are you using this script?

You can attach a PDF file to this question, so if you have a file that shows what you want to accomplish, it would be beneficial to have such a sample.
0
 

Author Comment

by:genewc
ID: 39626704
I've requested that this question be deleted for the following reason:

will post with more info
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 39627024
There is no reason to delete this question. Just post more information in a comment. And, request that the question be open and unanswered again.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe INTRODUCTION This article presents a solution to a question (http://www.experts-exchange.com/Programming/Installation/Q_28396542.html)…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now