I get the following error message:
SyntaxError: unterminated string literal
You're missing the closing double-quotes in line #3.
Also, if you're trying to inject a dynamic string into the text of your dialog you should probably know it's not possible to do it, at least not like this.
The only way I know of is to create the entire dialog object as a literal string and then execute it using the eval method, which is very very tricky.
Thanks guys....that was stupid of me.....lack of sleep does funny things to me.
I find it hard to believe I cannot make the message line and the title line dynamic....changeable after instantiating a new box.
I was trying to follow this example:
var TestDlg1 =
name: "My Test Dialog",
name: "Check the box",
name: "Check Box",
OK Guys, I finally figured this out - with one problem:
The users can close the dialog without hitting a button by hitting the Close "X" in the right corner.
1) Is there an execDialog property to remove the X ?
2) How can I use the Destroy method to trap the dialog and prevent closing it. Is it possible ?
Were you able to insert a dynamic text into the dialog?
Now the big problem is:
regular buttons do not fire their callbacks.
OK/Cancel buttons: no problem...they work with one fatal flaw.....the user can "X" close-out of the form without a response being returned.
Can you post an example?
Clicking the "X" button will also trigger the "destroy" event.
I'll do that later....I'm on deadline right now. I was able to eliminate the "X" button using custom buttons instead of the ok_cancel.
A couple of observations:
1) only 4 char string return value for dialog.end method ?
TOTALLY PATHETIC. Should allow "Variants"...any type to be returned
2) no Visible property ?
Again, TOTALLY PATHETIC. Very basic property that provides a lot of flexibility (which this API does NOT have)
3) no Property setting to eliminate the "X" close button.
Unbelievable. That puts this API actually BEHIND VBA which is going on 15+ years.
All in all, I am fast coming to the conclusion this was poorly designed (execDialog).
Couple that with the pathetic debugger and editor...and well, I have no respect for Acrobat technical management.....none.
So poorly was this done, one could only conclude: there's a really hot place in you-know-where reserved for the architects of execDialog.