# Launch the function loadJSON() with a html button

**URL:** <https://discourse.processing.org/t/launch-the-function-loadjson-with-a-html-button/2802>\
**Category:** Beginners\
**Created:** [August 20, 2018, 8:35pm UTC](https://discourse.processing.org/t/launch-the-function-loadjson-with-a-html-button/2802 "2018-08-20T20:35:21Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![mloiz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mloiz/32/11462_2.png) [@mloiz](https://discourse.processing.org/u/mloiz)\
**Post date:** [August 21, 2018, 8:50pm UTC](https://discourse.processing.org/t/launch-the-function-loadjson-with-a-html-button/2802/8 "2018-08-21T20:50:03Z")

</div>

> [@kfrajer](#):
>
> In your first code, I vbelieve those fields in the header need to be placed within quotation marks. If you check your console output, you should get some errors indicating you need to fix those fields. Did you see those messages?

Oh, no, no errors. I took thoses lines from @GoToLoop[Code 800A0404 issue - #3 by GoToLoop](https://discourse.processing.org/t/code-800a0404-issue/2036/3)

> [@kfrajer](#):
>
> I wasn’t able to get it to work. […] But it seems you got it to work,

yes, I verify my URLs before posting. below is the result.

 ![Capture](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/af072abf4da8cc53222dbcd7efe6c49c80cf1cdd.png)  
I really didn’t know you getting nothing, sorry for that… I understand know Kevin’s answer…

> [@kfrajer](#):
>
> You could attach it to an event associated to an element in your DOM. For example, when a mouse is clicked or a key is typed in a field. Is that what you mean?

I see… do you have an example ?  
so launching a P5JS function with `<input onclick=''\>` HTML is not recommanded/usual ?

---

_[View the full topic](https://discourse.processing.org/t/launch-the-function-loadjson-with-a-html-button/2802)._
