These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Simple Button Question

Flavi
Registered: Nov 11 2011
Posts: 1

I have been asked to create a button where the user clicks on it and it will attach to an email.
 
My code I am using is
 
this.mailDoc(true, "hidden [at] email [dot] com","hidden2 [at] email [dot] com",,"Submission form");
 
My question is my button is called btnSUBMIT. I am sort of new to javascript. How to I reference the button for this code?
 
Really confused.
 
Thanks for any help in advance.
 
Brad

My Product Information:
LiveCycle Designer, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1875
Did you create the form in Acrobat or LiveCycle Designer?

If Acrobat, simply place that code in a Mouse Up JavaScript action for the button. Note that if it needs to work with Reader, the document has to be Reader-enabled.


try67
Expert
Registered: Oct 30 2008
Posts: 2398
There's an error in your code. You can't just leave a parameter field empty. You need to either specify a value for it (even if it's an empty string), or to specify the names of the parameters that you pass to the function (in which case, you can just skip it).

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com