Print Page | Close Window

if statement for dropdown lists, result in txtbox

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: JavaScript
Forum Description: Discussions relating to the use of JavaScript within PDF.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=1211
Printed Date: 25 Apr 2019 at 3:03pm
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


Topic: if statement for dropdown lists, result in txtbox
Posted By: alock
Subject: if statement for dropdown lists, result in txtbox
Date Posted: 23 May 2014 at 4:52pm
Good Morning,

My users are all using Windows 7 (32-bit) as well as Adobe Acrobat X Pro.

I am using LiveCycle ES2 and am attempting to create a form, where when a value is selected from a dropbox list on the main form and where another value is selected from a dropbox list on a subform, a textbox is populated with some pre-defined text.

I am trying to accomplish this in JavaScript but am unable to do so.

The code I am trying is below:

form1.#subform[0].Subform1.WireIntructions::change - (JavaScript, client)

var ddBanks = form1.#subform[0].DDBanks.rawValue;
var ddInt = form1.#subform[0].Subform1.DDInternational.rawValue;

if (ddboxBanks == "RoyalBank" && ddInt == "Yes")
   {
   this.rawValue = "International Bank of the World \nConta No: 123456789012 \nIBAN: 12345678901234567890123456 \n1234-567 FUNCHAL (Canada) \nSwift Code: CAN123456ON \nRef: FQA";
   }
   else if (ddboxBanks == "RoyalBank" && ddInt == "No")
   {
   this.rawValue = "Send to Internal Control \nRef: Int Ontario Not International";
   }
    else
   {
   this.rawValue = "";
   }   

if (ddboxBanks == "ScotiaBank" && ddInt == "Yes")
   {
   this.rawValue = "Universe Bank \nConta No: 123456789012 \nIBAN: 12345678901234567890123456 \n1234-567 FUNCHAL (Canada) \nSwift Code: CAN789456ON \nRef: BBA";
   }
   else if (ddboxBanks == "RoyalBank" && ddInt == "No")
   {
   this.rawValue = "Send to Internal Control \nRef: Universe";
   }
    else
   {
   this.rawValue = "";
   }    


 

I have also attached an example of the form that I created in LiveCycle.

uploads/1700/If_Value_Example.pdf - uploads/1700/If_Value_Example.pdf

Can someone help me out?

Regards,

A

 

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net