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

(") quote marks in text populated by Javascript??

cfinley
Registered: Jan 9 2008
Posts: 70
Answered

Hi,

I'm using the code found on http://www.acrobatusers.com/forums/ask_an_expert/questions/view/1984/ to autopopulate text fields based on dropdown box choices, but one of the fields contains box for size - which uses inches for units... there isnt really room to spell out inches or even in. , so I kinda need to stick with "

ex: size: .109" x 12" x 8"

in the code,

PartSize.rawValue = ".109 x 12 x 8";
works fine

PartSize.rawValue = ".109" x 12" x 8":
Breaks everything, not just that field

is there some way I can still display " in the text field to stand for inches? Is there another character I can use to substitute in the code that will display as " ? Or do I have to do something like set " as a variable and then somehow reference the variable between the script " " ?

If the answer involves more Java please be as specific as possible or maybe include a small bit of sample code since I'm totally new to LiveCycle and especially JavaScript

Thanks!

R_Boyd
Registered: Nov 1 2007
Posts: 151
The others will correct me if I'm wrong but you should be able to get it to work by using the escape characters \" to indicate a double quote.

PartSize.rawValue = ".109"\" x 12"\" x 8"\" ";
cfinley
Registered: Jan 9 2008
Posts: 70
Thank you so much! I can't believe how helpful everyone has been for my newbie questions...

I tried your suggestion but it didnt work at first - I played around with it and found I had to use only single quote marks following the backslash

ex:

text displayed: .109" x 12" x 8"

working code: PartSize.rawValue = ".109\" x 12\" x 8\"";