I'm trying to create a simple alert dialog box, but I'm quite a new beginner to Javascripting.
This is what I have attached to a button in Acroform (Acrobat Pro 9.0 - MAC Os) - Trigger - Mouse Up, Action - Run Javascript
It appears not to like line 7. I'd like it to display an alert with the modified path.
var Account = this.getField("Account");
var Template = this.getField("DABTemplate");
var TempName = DABTemplate.toString().substr(6,8)
var Path = “///Volumes/DocumentStore”;
var TotalPath = Path + “/" + "Display Ad Templates ” + TempName;
app.alert({
cMsg: TotalPath
});
I'm really new to JS, so I beg your patience and help.
thanks
John
Template.value
Use this in the "substr" operation.
Also several of your quotes appear not to be standard ASCII quotes, this will definately cause problems.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script