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

BONUS GIFT FROM RADZMAR...

PetafromOz
Registered: Jun 8 2009
Posts: 230
Answered

Hi everyone,

Radzmar posted a great bonus on the JavaScript forum, but it works just as well in LiveCycle, so I thought I'd share the link.

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=21382

It's a JavaScript list of special character codes that you can use to enhance the look of your 'messageBox' displays. I used it myself today and it makes the messages look much more professional.

Here's what I did:
xfa.host.messageBox("This 'h' value field can only:\r \7 be left empty, \r \7 have a value of 0, or \r \7 have an 'h' range value of between " + HazMin.rawValue + " and " + HazMax.rawValue + " (incl.). \r Please re-enter.","Incorrect Hazard ('h') factor",3);

It's a big line of code I know, but it produces a message with new lines and bullet points and looks much clearer than just a big line of text. Although from memory the bullet code '\7' can only be used with Vista. If you want to try out the one I've done above just to see, replace the fieldnames with actual numbers, so:

xfa.host.messageBox("This 'h' value field can only:\r \7 be left empty, \r \7 have a value of 0, or \r \7 have an 'h' range value of between 10 and 100 (incl.). \r Please re-enter.","Incorrect Hazard ('h') factor",3);

And if you're not using Vista, I think it will just ignore the \7.

But, it's still a handy thing to create a more professional looking result.
Thanks Radzmar

from way... underground at Parkes - central West NSW - Australia

My Product Information:
LiveCycle Designer, Windows
PetafromOz
Registered: Jun 8 2009
Posts: 230
Oops, I just learnt a lesson. Even though I can use those \7 bullet codes, because I'm running Vista - it's not a good idea. Because if someone running windows, opens my form - the bullets come out all wrong. So it's not just a case of being able to do it at my end, when using these codes, we need to take into account the range of systems being used by other people who will use our forms.

from way... underground at Parkes - central West NSW - Australia

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can use the Unicode character codes the '\7' is the control code for 'Bell'.

These codes and the character that is displayed is also dependent upon what fonts are installed and being used by the client's system. Unlike the text content, the fonts used for the console and alert and message box might not use the embedded metrics.

George Kaiser

PetafromOz
Registered: Jun 8 2009
Posts: 230
Aha. Traps for young players eh? Thanks gkaiseril.

from way... underground at Parkes - central West NSW - Australia