For short amount of text (fitting in the parameters of an URL), one can use, in classical Processing, loadStrings with an URL to transmit these parameters. If loadStrings works this way in PJS too, it can be simpler for you... I suggested Ajax because I didn't know the size of the data you needed to transmit.
you can use loadStrings() in pjs to get content from a text file in but browser restrictions prevent directly writing files to the system. you have to use a work around method with server side code like the above example mentioned.
Leave a comment on dhodgin's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic