How do i send/receive files with pure JS?

with the block in the

with all website except snap.berkeley.edu it just reports nothing

Screenshot 2021-05-29 165950
im trying to use it in snap
edit: i will try again

im trying to use it in snap

test
wait button tag does not work?

You need to define a variable or function parameter called data and assign to it the data you want to send.


Same thing (

)


Only a subset of HTML can be used on the forum (i.e. iframe for Snap! projects and text-formatting ones like p, h1-h6, b, i, strike, em, etc. [maybe more?])

You have to use filereader functions
The reason I didn’t provide them is because you can read the files in multiple formats
As txt, as data url, etc
And use .result to see the result

Replace https://www.example.com/ with an actual website!

that is not what I'm showing

it says that "data" is not defined

HTML Runner script pic (1)
You can change were it ends .html to .txt this is from my game HTML Runner: Snap! 6.8.1 Build Your Own Blocks (berkeley.edu)

This will help you:


To view the blocks and see the code of the selected blocks, please follow this URL:
https://snap.berkeley.edu/snap/snap.html#present:Username=alessandrito123&ProjectName=Proyecto%20Experimental%20para%20Todos

Er, there in a different language. It would be awesome if you translated it. :~)

Ok, but please read this post of me and why: My first and the best project I made for Snap!

This doesn't explain anything to me. Could you be a bit more descriptive?

Could you please translate the blocks into english?

Probably, but the experimental translations button is inestable for me :slightly_frowning_face:, please check this post:
https://forum.snap.berkeley.edu/t/my-first-and-the-best-project-i-made-for-snap/6887/17

Just use translate.google.com

Yes, but the user will only need to switch language once in their entire time on Snap! and a cookie is made to remember language preference.

Here is a translation: Snap! 6.8.1 Build Your Own Blocks
(I did about 2/3 of it myself. The other 1/3 I used Google Translate.)

Wow, your project is awesome, thanks for translating my blocks. :relieved: :wink: :sweat_smile: