# Is it possible to save any data produced with sketch on web?

**URL:** https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386
**Category:** Coding Questions
**Created:** [November 13, 2020, 5:08am UTC](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386 "2020-11-13T05:08:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![candydope](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@candydope](https://discourse.processing.org/u/candydope)
#### Post date: [November 13, 2020, 5:08am UTC](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386/1 "2020-11-13T05:08:04Z")

</div>

hello, I’m newbie for coding. I use processing mostly for art projects. now I’m working on coding for my friend’s project which is about writing a poem with limited words on web site.  
I managed to make sketch which seems like duolingo, but I couldn’t have thought about how to save the resort. at first, I wanted to send email to myself, but there’s some problem. I only used processing and processing.js, so I can’t use more external library or java script.  
sending email is not necessary for this project, but I need the resorts(short poems which people wrote) for publication.  
I would like to ask any other ways to save or backup the resort. and I’m also considering re-coding everything with p5.js, though I’m not sure if it would take or work properly.(I’ve never used java script or p5.js, and It is all from my mistake that I thought processing can be exported as html5.)  
though I will attatch the code later, I made final resorts(words in order including blank and line break) saved in a string.  
please help me… I took a project which is upper then my level🥺…

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [November 13, 2020, 5:21am UTC](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386/2 "2020-11-13T05:21:36Z")

</div>

> [@candydope](#):
>
> And I’m also considering re-coding everything with p5.js,

> [@candydope](#):
>
> I only used Processing and Processing.js, so I can’t use external libraries or JavaScript.

If you’ve already got the basics of your sketch running on a browser you won’t need to re-write everything w/ p5\*js.

You can code the email part on a separate JS file and invoke it inside your PDE file.

Both Processing.js (Pjs) & p5\*js are JS librares.

Main difference is that Pjs can also transpile PDE files to JS syntax while p5\*js can’t.

---

<div class="post-metadata">

### Author: ![candydope](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@candydope](https://discourse.processing.org/u/candydope)
#### Post date: [November 13, 2020, 5:45am UTC](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386/3 "2020-11-13T05:45:13Z")

</div>

I’m so grateful for big help.  
I found that .html which includes processing.js doesn’t work if there is another script. so I’m trying to embed the processing page on another page.  
is it possible to get String from other html or script?? this is the page.  
([http://kimhankyul.com/waaktaar/waaktaar.html](http://kimhankyul.com/waaktaar/waaktaar.html))  
I made simple href connected to contact page temporarily, It would be great if the resort string is put on mail body with script.  
any advice like mentioning possible references would be great help. so grateful.

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [November 13, 2020, 5:53am UTC](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386/4 "2020-11-13T05:53:26Z")

</div>

> [@candydope](#):
>
> I found that “.html” which includes Processing.js doesn’t work if there is another script.

Processing.js (Pjs) can mix up w/ other libraries normally.

Take a look at the content of the “index.html” file from this post below which loads “toxiclibs.js” library together w/ “processing.js” and other 2 “.js” files:

> [@Wolfram Physics in Vanilla Processing](https://discourse.processing.org/t/wolfram-physics-in-vanilla-processing/25153/9):
>
> It’s a very interesting read about Glitch’s backend (server-side) containerized language features. However my hosted sketch “Blob Growth” runs 100% on the frontend (client-side). In order to run it on the Processing’s IDE (PDE) only file “Blob\_Growth.pde” is needed: [Blob-Growth-Java.Glitch.me/Blob\_Growth.pde](http://Blob-Growth-Java.Glitch.me/Blob_Growth.pde) For browser-running we need 3 more files though. The “index.html” as its entry point: \<script defer src=https://cdn.JsDelivr.net/gh/hapticdata/toxiclibsjs/build/toxiclibs.min.js\> \</…

---

<div class="post-metadata">

### Author: ![candydope](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@candydope](https://discourse.processing.org/u/candydope)
#### Post date: [November 13, 2020, 7:03am UTC](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386/5 "2020-11-13T07:03:50Z")

</div>

thank you, It works perfectly with pde file on server.  
so I’m trying to use additional script file, but how can I get String in pde file in new js file?  
I tried GetComponent, but it seems like doesn’t work for web…

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [November 13, 2020, 7:27am UTC](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386/6 "2020-11-13T07:27:17Z")

</div>

> [@candydope](#):
>
> , but how can I get String in pde file in new js file?

I can’t figure out what string you’re talking about.

> [@candydope](#):
>
> I tried GetComponent, but it seems like doesn’t work for web…

I’m still not good on dealing w/ the browser DOM components.

And I’ve got no idea what you mean by **getComponent()**.

If you need help w/ code you need to post it, preferably a runnable/compilable version of it.

Hosting your attempt running online is even better.
