You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Documentation request] Please provide a simple standalone .html example (via opal-generated code) to demonstrate how the user clicks on a button, and then a function is called in a ruby class
#2423
Open
rubyFeedback opened this issue
May 28, 2022
· 2 comments
I finally got opal to work and I compiled some app.js file, which I then used via
a test.html page. It's the hello world example. The dev console shows "Hello
world!" so it works. But now I am not sure how to proceed from here. I looked
at the examples but they seem a bit like unorganized fragments.
A button in a standalone .html page. (The javascript is compiled into a standalone .js
that is included in that .html page then)
On clicking the button a method is called in a ruby class (but part of that .js file)
that uses an alert-box to say hello world and fetches some value from a formular
such as the name of the user. So a button and a form field.
This can be kept as simple as possible. I would like to know how I can work with
data from a form field, and how to use a button to call that.
The text was updated successfully, but these errors were encountered:
I finally got opal to work and I compiled some app.js file, which I then used via
a test.html page. It's the hello world example. The dev console shows "Hello
world!" so it works. But now I am not sure how to proceed from here. I looked
at the examples but they seem a bit like unorganized fragments.
Would it be possible to add a NEW example, at:
https://opalrb.com/docs/guides/master/
With SPECIFICALLY this content to be tested:
that is included in that .html page then)
that uses an alert-box to say hello world and fetches some value from a formular
such as the name of the user. So a button and a form field.
This can be kept as simple as possible. I would like to know how I can work with
data from a form field, and how to use a button to call that.
The text was updated successfully, but these errors were encountered: