Expand my Community achievements bar.

SOLVED

messageBox help

Avatar

Level 3

Two simple questions about a messagebox.

First, is there a way to add line breaks within the text of a messagebox, so that I would have two paragraphs?  I thought I might be able to use /n somehow, but it just shows up in my text, and is not turned into a line break.

Second, I want to have some messageboxes that are just friendly help windows.  But every messagebox has its title begin with "Warning: JavaScript Window - ".  Is there any way to just have a window that says "Help"?

Thanks,

Emily

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Emily,

You were close - it is backslash + n  "\n\n" will give you a new paragraph.

However you are stuck with the second issue. When you script a dialogue window then Acrobat feels is necessary that the window is not an Acrobat window and that it may be doing nasty stuff under the hood. Hence the warning.

If you have a look at the messageBox help, the second parameter sets the title of the window. While it will still contain the Warning: Javascript Window, it will include your title as well.

Good luck,

Niall

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi Emily,

You were close - it is backslash + n  "\n\n" will give you a new paragraph.

However you are stuck with the second issue. When you script a dialogue window then Acrobat feels is necessary that the window is not an Acrobat window and that it may be doing nasty stuff under the hood. Hence the warning.

If you have a look at the messageBox help, the second parameter sets the title of the window. While it will still contain the Warning: Javascript Window, it will include your title as well.

Good luck,

Niall