On 12/21/14, [hidden email] <[hidden email]> wrote:
> Le 21 déc. 2014 04:48, "Richard Eng" <[hidden email]> a écrit : >> >> I'm still having trouble grokking Amber. The severe lack of documentation > is really holding me back. I'm just trying to get a handle on the basics of > working with HTML elements such as forms and input fields. For example, how > do I obtain the value that a user types into an input field? How do I go > about processing a form? For example (document getElementById: 'theIdOfMyInputField') value >> We need more Amber examples that cover the basics of HTML and DOM > elements. > > For most of the forms related things, I'd use jQuery facilities to access > fields. > > #field1 asJQuery ... #field1 asJQuery value gives an error message Richard, your contribution is an important question. May I ask you to open an issue at https://github.com/amber-smalltalk/amber-documentation/issues > > So, as Amber gives direct access to the jQuery API, one can read form > values as one would in jQuery. > > I am away from the dev box but this should help you getting started. > > FWIW I've started documentation works and there is a piece foreseen about > that. > > HTH > Phik > > >> >> -- >> You received this message because you are subscribed to the Google Groups > "amber-lang" group. >> To unsubscribe from this group and stop receiving emails from it, send an > email to [hidden email]. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [hidden email]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Surprisingly, this works:
-- '#field1' asJQuery val. The reason is because the JavaScript function is val(). On Sunday, 21 December 2014 10:21:51 UTC-5, Hannes wrote: On 12/21/14, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="hHhfxGIW9KwJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ph...@... <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="hHhfxGIW9KwJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ph...@...> wrote: You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Great. All Javascript methods in jQuery are available to you this way. Multi parameter functions are then mapped like: aQuery.sampleFunc (a,b,c); aQuery sampleFunc: a and: b and: c. The and: can be whatever. The only thing that matters is mapping the function name. Phil Phil You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |