Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Radio button to determine what text is put into th
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Radio button to determine what text is put into th

 Post Reply Post Reply
Author
Erick View Drop Down
New Member
New Member
Avatar

Joined: 11 May 2015
Location: Florida
Points: 2
Post Options Post Options   Quote Erick Quote  Post ReplyReply Direct Link To This Post Topic: Radio button to determine what text is put into th
    Posted: 11 May 2015 at 6:07pm

 





 
Hi all,
I need some help with a radio button and java scripting. This is the code I'm using on a button with a mouse up event using Java script run at the client
 

 
var oSubmit = this.resolveNode("$..#submit");

 
var cToAddr = "abc@sdf.org";
var cCCAddr = "abc@sdf.org";

var cSubLine = "Security Access Authorization";

var cBodya = "Dear Help Desk," + "\n" + "\n" + 
 
"This email serves as my electronic approval for " + "\n" + "\n"
 
 var cBodyb = "============ SECURITY ACCESS REQUEST DETAILS ================" + "\n" + "\n"

 
var cBodyc = (EffDate.length ="")if(EffDate.rawValue)
cBodyc = "Effective Date - " + EffDate.formattedValue + "\n" + "\n"
 
var cBodyd = (RadBut.length == "2")
if(RadBut.rawValue)
cBodyd = "Status - Create New User Account" + "\n" + "\n"

var cBodye = (RadBut.length =="3")
if(RadBut.rawValue)cBodye = "Status - Add/Remove Access" + "\n" + "\n"
 
var cBodyf = (RadBut.length == "5")
if(RadBut.rawValue)
cBodyf = "Status - Terminate" + "\n" + "\n"
 
var cBodyg = (RadBut.length == "1")if(RadBut.rawValue)
cBodyg = "Status - Department Transfer from " + "\n" + "\n"  
 
var cBodyh = (RadBut.length == "4")
if(RadBut.rawValue)
cBodyh = "Request to have name changed to - " + "\n" + "\n";
 
 

 
oSubmit.target ="mailto:" + cToAddr + "?cc=" + cCCAddr + "&subject=" + cSubLine
+ "&body=" + cBodya + cBodyb + cBodyc + cBodyd + cBodye  +cBodyf  + cBodyg + cBodyh ;

  
  No matter what I try, it always put all of the choices in the
  body of the email, not just the one I checked. any help would be greatly
  appreciated...Thanks Erick
 



 

 



 

 



 



Edited by Erick - 11 May 2015 at 6:17pm
Back to Top
Sponsored Links


Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4071
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2015 at 7:11pm
You code looks like a mix of LiveCycle FormCalc and Acrobat JavaScript.
You need to tell us what program you are using to create the form.
 
Both FormCalc and JavaScript have code that denotes the start and end of a block of code to run conditionally. I see none of that code syntax in you code.
Back to Top
Erick View Drop Down
New Member
New Member
Avatar

Joined: 11 May 2015
Location: Florida
Points: 2
Post Options Post Options   Quote Erick Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2015 at 7:21pm
I'm Using Livecycle Designer ES3. I wasn't aware that I was mixing code, I'm fairly new to this. What part is FormCalc? Thanks for the help
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.031 seconds.