Checkbox

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Checkbox

horrido
I'm puzzled by the html checkbox element. When I render it as follows:

html input type="checkbox"; name="something"; id="foo"; yourself.

the value of the checkbox is always 'on', even though it's not actually checked. And if I check it and then uncheck it, the value is still 'on'. There seems to be no way to alter the value.

How do I know whether or not the checkbox is checked???

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

Bernat Romagosa
Richard, 

you need to wrap inputs between option tags, and set the "checked" attribute to the one that's checked.


Cheers,
Bernat.

2015-06-03 21:54 GMT+02:00 Richard Eng <[hidden email]>:
I'm puzzled by the html checkbox element. When I render it as follows:

html input type="checkbox"; name="something"; id="foo"; yourself.

the value of the checkbox is always 'on', even though it's not actually checked. And if I check it and then uncheck it, the value is still 'on'. There seems to be no way to alter the value.

How do I know whether or not the checkbox is checked???

--
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.



--
Bernat Romagosa.

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

Herby Vojčík


Bernat Romagosa wrote:
> Richard,
>
> you need to wrap inputs between option tags, and set the "checked"
> attribute to the one that's checked.
>
> http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked

Eh, this seems to mix two things. On the link you posted there is no
<option>, there is just a simple form.

>
> Cheers,
> Bernat.
>
> 2015-06-03 21:54 GMT+02:00 Richard Eng <[hidden email]
> <mailto:[hidden email]>>:
>
>     I'm puzzled by the html checkbox element. When I render it as follows:
>
>     ||
>     html input type="checkbox";name="something";id="foo";yourself.

I think this syntax would not work, you must have use something else...

>
>     the value of the checkbox is always 'on', even though it's not
>     actually checked. And if I check it and then uncheck it, the value
>     is still 'on'. There seems to be no way to alter the value.

What do you mean by "value of the checkbox"?

BTW, `<input type="checkbox" checked>` is in fact just shortcut of
canonical `<input type="checkbox" checked="checked">`, so `html input
at: 'type' put: 'checkbox'; at: 'checked' put: 'checked'; yourself` in
Web or `Silk INPUT << #{'type' -> 'checkbox'. 'checked' -> 'checked'};
yourself` in Silk.

Another problem is, the 'checked' thing from previous paragraph is just
an attribute telling the default state element should appear in. It
always stays the same, regardless of actual state of the checkbox.

The actual checked state in is JS property of the DOM element, as seen
in http://www.w3schools.com/jsref/prop_checkbox_checked.asp. You can
either take it out via jQuery's val() like `checkbox asJQuery val`, or
go direct: `checkbox element checked` in Web or `checkbox propAt:
'checked'` in Silk.

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

Herby Vojčík


Herby Vojčík wrote:

>
>
> Bernat Romagosa wrote:
>> Richard,
>>
>> you need to wrap inputs between option tags, and set the "checked"
>> attribute to the one that's checked.
>>
>> http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked
>
> Eh, this seems to mix two things. On the link you posted there is no
> <option>, there is just a simple form.
>
>>
>> Cheers,
>> Bernat.
>>
>> 2015-06-03 21:54 GMT+02:00 Richard Eng <[hidden email]
>> <mailto:[hidden email]>>:
>>
>> I'm puzzled by the html checkbox element. When I render it as follows:
>>
>> ||
>> html input type="checkbox";name="something";id="foo";yourself.
>
> I think this syntax would not work, you must have use something else...
>
>>
>> the value of the checkbox is always 'on', even though it's not
>> actually checked. And if I check it and then uncheck it, the value
>> is still 'on'. There seems to be no way to alter the value.
>
> What do you mean by "value of the checkbox"?
>
> BTW, `<input type="checkbox" checked>` is in fact just shortcut of
> canonical `<input type="checkbox" checked="checked">`, so `html input
> at: 'type' put: 'checkbox'; at: 'checked' put: 'checked'; yourself` in
> Web or `Silk INPUT << #{'type' -> 'checkbox'. 'checked' -> 'checked'};

Errata: `Silk INPUT << {'type' -> 'checkbox'. 'checked' -> 'checked' }`.
It should be a plain dynamic array, which is just put on the stream one
element after another (and association sets an attribute), a
HashedCollection is not processed specially.

> yourself` in Silk.
>
> Another problem is, the 'checked' thing from previous paragraph is just
> an attribute telling the default state element should appear in. It
> always stays the same, regardless of actual state of the checkbox.
>
> The actual checked state in is JS property of the DOM element, as seen
> in http://www.w3schools.com/jsref/prop_checkbox_checked.asp. You can
> either take it out via jQuery's val() like `checkbox asJQuery val`, or
> go direct: `checkbox element checked` in Web or `checkbox propAt:
> 'checked'` in Silk.
>

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

Bernat Romagosa
In reply to this post by Herby Vojčík
Ouch yes, indeed I mixed two things, I was thinking of radio buttons and posted the link to checkboxes.

2015-06-03 22:36 GMT+02:00 Herby Vojčík <[hidden email]>:


Bernat Romagosa wrote:
Richard,

you need to wrap inputs between option tags, and set the "checked"
attribute to the one that's checked.

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked

Eh, this seems to mix two things. On the link you posted there is no <option>, there is just a simple form.


Cheers,
Bernat.

2015-06-03 21:54 GMT+02:00 Richard Eng <[hidden email]
<mailto:[hidden email]>>:

    I'm puzzled by the html checkbox element. When I render it as follows:

    ||
    html input type="checkbox";name="something";id="foo";yourself.

I think this syntax would not work, you must have use something else...


    the value of the checkbox is always 'on', even though it's not
    actually checked. And if I check it and then uncheck it, the value
    is still 'on'. There seems to be no way to alter the value.

What do you mean by "value of the checkbox"?

BTW, `<input type="checkbox" checked>` is in fact just shortcut of canonical `<input type="checkbox" checked="checked">`, so `html input at: 'type' put: 'checkbox'; at: 'checked' put: 'checked'; yourself` in Web or `Silk INPUT << #{'type' -> 'checkbox'. 'checked' -> 'checked'}; yourself` in Silk.

Another problem is, the 'checked' thing from previous paragraph is just an attribute telling the default state element should appear in. It always stays the same, regardless of actual state of the checkbox.

The actual checked state in is JS property of the DOM element, as seen in http://www.w3schools.com/jsref/prop_checkbox_checked.asp. You can either take it out via jQuery's val() like `checkbox asJQuery val`, or go direct: `checkbox element checked` in Web or `checkbox propAt: 'checked'` in Silk.


--
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.



--
Bernat Romagosa.

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

horrido
In reply to this post by Herby Vojčík
I have some code that collects values from all of the input elements of a form (where 'inputs' is an Array):

    inputs do: [ :each |
        dictionary at
: (each asJQuery attr: 'name') put: (each asJQuery val).
   
].

I rendered the form this way:

    inputs add: (html input id: inputName;
    name
: inputName;
    type
: typeName;
    yourself
)

Unfortunately, this only works for some input elements, such as 'text', 'password', 'file', 'email', 'number', etc. Other elements, such as 'checkbox', 'radio', and 'button', must be special-cased. So I can't generalize on capturing the 'value' of an input element. This makes for messier code.


On Wednesday, 3 June 2015 16:36:42 UTC-4, Herby wrote:


Bernat Romagosa wrote:
> Richard,
>
> you need to wrap inputs between option tags, and set the "checked"
> attribute to the one that's checked.
>
> <a href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Ftags%2Ftryit.asp%3Ffilename%3Dtryhtml_input_checked\46sa\75D\46sntz\0751\46usg\75AFQjCNF6B1Gd7xbt1s_Km4WH9XsExsUZ-w';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Ftags%2Ftryit.asp%3Ffilename%3Dtryhtml_input_checked\46sa\75D\46sntz\0751\46usg\75AFQjCNF6B1Gd7xbt1s_Km4WH9XsExsUZ-w';return true;">http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked

Eh, this seems to mix two things. On the link you posted there is no
<option>, there is just a simple form.

>
> Cheers,
> Bernat.
>
> 2015-06-03 21:54 GMT+02:00 Richard Eng <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="1R8cNH_wPgwJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">horrido...@...
> <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="1R8cNH_wPgwJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">horrido...@gmail.com>>:
>
>     I'm puzzled by the html checkbox element. When I render it as follows:
>
>     ||
>     html input type="checkbox";name="something";id="foo";yourself.

I think this syntax would not work, you must have use something else...

>
>     the value of the checkbox is always 'on', even though it's not
>     actually checked. And if I check it and then uncheck it, the value
>     is still 'on'. There seems to be no way to alter the value.

What do you mean by "value of the checkbox"?

BTW, `<input type="checkbox" checked>` is in fact just shortcut of
canonical `<input type="checkbox" checked="checked">`, so `html input
at: 'type' put: 'checkbox'; at: 'checked' put: 'checked'; yourself` in
Web or `Silk INPUT << #{'type' -> 'checkbox'. 'checked' -> 'checked'};
yourself` in Silk.

Another problem is, the 'checked' thing from previous paragraph is just
an attribute telling the default state element should appear in. It
always stays the same, regardless of actual state of the checkbox.

The actual checked state in is JS property of the DOM element, as seen
in <a href="http://www.w3schools.com/jsref/prop_checkbox_checked.asp" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Fjsref%2Fprop_checkbox_checked.asp\46sa\75D\46sntz\0751\46usg\75AFQjCNGJaHznUBOg1H-MlN2z7rWiSdO_Yg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Fjsref%2Fprop_checkbox_checked.asp\46sa\75D\46sntz\0751\46usg\75AFQjCNGJaHznUBOg1H-MlN2z7rWiSdO_Yg';return true;">http://www.w3schools.com/jsref/prop_checkbox_checked.asp. You can
either take it out via jQuery's val() like `checkbox asJQuery val`, or
go direct: `checkbox element checked` in Web or `checkbox propAt:
'checked'` in Silk.

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

Herby Vojčík
As you say, jQuery val() is not generic. Then yes, you must do it differently.

I'd advise you to stop looking at form as array-like collection of generic inputs, but more like object-like record of specific inputs. And though having special methods to fill / read, or even special class (a Widget subclass) to take care of each specific form.

Richard Eng wrote:

> I have some code that collects *values* from all of the input elements
> of a form (where 'inputs' is an Array):
>
> ||
> inputs do:[:each |
> dictionary at:(each asJQuery attr:'name')put:(each asJQuery val).
> ].
>
> I rendered the form this way:
>
> ||
> inputs add:(html input id:inputName;
> name:inputName;
> type:typeName;
> yourself)
>
> Unfortunately, this only works for some input elements, such as
> 'text', 'password', 'file', 'email', 'number', etc. Other elements,
> such as 'checkbox', 'radio', and 'button', must be special-cased. So I
> can't generalize on capturing the 'value' of an input element. Thi
s

> makes for messier code.
>
>
> On Wednesday, 3 June 2015 16:36:42 UTC-4, Herby wrote:
>
>
>
>     Bernat Romagosa wrote:
>     > Richard,
>     >
>     > you need to wrap inputs between option tags, and set the "checked"
>     > attribute to the one that's checked.
>     >
>     >
>     http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked
>     <http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked>
>
>
>     Eh, this seems to mix two things. On the link you posted there is no
>     <option>, there is just a simple form.
>
>     >
>     > Cheers,
>     > Bernat.
>     >
>     > 2015-06-03 21:54 GMT+02:00 Richard Eng <[hidden email]
>     <javascript:>
>     > <mailto:[hidden email] <javascript:>>>:
>     >
>     > I'm puzzled by the html checkbox element. When I render it as
>     follows:
>     >
>     > ||
>     > html input type="checkbox";name="something";id="foo";yourself.
>
>     I think this syntax would not work, you
must have use something

>     else...
>
>     >
>     > the value of the checkbox is always 'on', even though it's not
>     > actually checked. And if I check it and then uncheck it, the value
>     > is still 'on'. There seems to be no way to alter the value.
>
>     What do you mean by "value of the checkbox"?
>
>     BTW, `<input type="checkbox" checked>` is in fact just shortcut of
>     canonical `<input type="checkbox" checked="checked">`, so `html input
>     at: 'type' put: 'checkbox'; at: 'checked' put: 'checked';
>     yourself` in
>     Web or `Silk INPUT << #{'type' -> 'checkbox'. 'checked' ->
>     'checked'};
>     yourself` in Silk.
>
>     Another problem is, the 'checked' thing from previous paragraph is
>     just
>     an attribute telling the default state element should appear in. It
>     always stays the same, regardless of actual state of the checkbox.
>
>     The actual checked state in is JS property of the DOM element, as
>     seen
>     in http:/
/www.w3schools.com/jsref/prop_checkbox_checked.asp

>     <http://www.w3schools.com/jsref/prop_checkbox_checked.asp>. You can
>     either take it out via jQuery's val() like `checkbox asJQuery
>     val`, or
>     go direct: `checkbox element checked` in Web or `checkbox propAt:
>     'checked'` in Silk.
>
> --
> 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]
> <mailto:[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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

horrido
Btw, this is a good way to test the checkbox state:

'#Checkbox' asJQuery prop: 'checked'

Thanks for all the guidance. I'm finally on a roll.


On Thursday, 4 June 2015 06:14:06 UTC-4, Herby wrote:
As you say, jQuery val() is not generic. Then yes, you must do it differently.

I'd advise you to stop looking at form as array-like collection of generic inputs, but more like object-like record of specific inputs. And though having special methods to fill / read, or even special class (a Widget subclass) to take care of each specific form.

Richard Eng wrote:

> I have some code that collects *values* from all of the input elements
> of a form (where 'inputs' is an Array):
>
> ||
> inputs do:[:each |
> dictionary at:(each asJQuery attr:'name')put:(each asJQuery val).
> ].
>
> I rendered the form this way:
>
> ||
> inputs add:(html input id:inputName;
> name:inputName;
> type:typeName;
> yourself)
>
> Unfortunately, this only works for some input elements, such as
> 'text', 'password', 'file', 'email', 'number', etc. Other elements,
> such as 'checkbox', 'radio', and 'button', must be special-cased. So I
> can't generalize on capturing the 'value' of an input element. Thi
s

> makes for messier code.
>
>
> On Wednesday, 3 June 2015 16:36:42 UTC-4, Herby wrote:
>
>
>
>     Bernat Romagosa wrote:
>     > Richard,
>     >
>     > you need to wrap inputs between option tags, and set the "checked"
>     > attribute to the one that's checked.
>     >
>     >
>     <a href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Ftags%2Ftryit.asp%3Ffilename%3Dtryhtml_input_checked\46sa\75D\46sntz\0751\46usg\75AFQjCNF6B1Gd7xbt1s_Km4WH9XsExsUZ-w';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Ftags%2Ftryit.asp%3Ffilename%3Dtryhtml_input_checked\46sa\75D\46sntz\0751\46usg\75AFQjCNF6B1Gd7xbt1s_Km4WH9XsExsUZ-w';return true;">http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked
>     <<a href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Ftags%2Ftryit.asp%3Ffilename%3Dtryhtml_input_checked\46sa\75D\46sntz\0751\46usg\75AFQjCNF6B1Gd7xbt1s_Km4WH9XsExsUZ-w';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Ftags%2Ftryit.asp%3Ffilename%3Dtryhtml_input_checked\46sa\75D\46sntz\0751\46usg\75AFQjCNF6B1Gd7xbt1s_Km4WH9XsExsUZ-w';return true;">http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_checked>
>
>
>     Eh, this seems to mix two things. On the link you posted there is no
>     <option>, there is just a simple form.
>
>     >
>     > Cheers,
>     > Bernat.
>     >
>     > 2015-06-03 21:54 GMT+02:00 Richard Eng <[hidden email]
>     <javascript:>
>     > <mailto:[hidden email] <javascript:>>>:
>     >
>     > I'm puzzled by the html checkbox element. When I render it as
>     follows:
>     >
>     > ||
>     > html input type="checkbox";name="something";id="foo";yourself.
>
>     I think this syntax would not work, you
must have use something

>     else...
>
>     >
>     > the value of the checkbox is always 'on', even though it's not
>     > actually checked. And if I check it and then uncheck it, the value
>     > is still 'on'. There seems to be no way to alter the value.
>
>     What do you mean by "value of the checkbox"?
>
>     BTW, `<input type="checkbox" checked>` is in fact just shortcut of
>     canonical `<input type="checkbox" checked="checked">`, so `html input
>     at: 'type' put: 'checkbox'; at: 'checked' put: 'checked';
>     yourself` in
>     Web or `Silk INPUT << #{'type' -> 'checkbox'. 'checked' ->
>     'checked'};
>     yourself` in Silk.
>
>     Another problem is, the 'checked' thing from previous paragraph is
>     just
>     an attribute telling the default state element should appear in. It
>     always stays the same, regardless of actual state of the checkbox.
>
>     The actual checked state in is JS property of the DOM element, as
>     seen
>     in http:/
/<a href="http://www.w3schools.com/jsref/prop_checkbox_checked.asp" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Fjsref%2Fprop_checkbox_checked.asp\46sa\75D\46sntz\0751\46usg\75AFQjCNGJaHznUBOg1H-MlN2z7rWiSdO_Yg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Fjsref%2Fprop_checkbox_checked.asp\46sa\75D\46sntz\0751\46usg\75AFQjCNGJaHznUBOg1H-MlN2z7rWiSdO_Yg';return true;">www.w3schools.com/jsref/prop_checkbox_checked.asp

>     <<a href="http://www.w3schools.com/jsref/prop_checkbox_checked.asp" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Fjsref%2Fprop_checkbox_checked.asp\46sa\75D\46sntz\0751\46usg\75AFQjCNGJaHznUBOg1H-MlN2z7rWiSdO_Yg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.w3schools.com%2Fjsref%2Fprop_checkbox_checked.asp\46sa\75D\46sntz\0751\46usg\75AFQjCNGJaHznUBOg1H-MlN2z7rWiSdO_Yg';return true;">http://www.w3schools.com/jsref/prop_checkbox_checked.asp>. You can
>     either take it out via jQuery's val() like `checkbox asJQuery
>     val`, or
>     go direct: `checkbox element checked` in Web or `checkbox propAt:
>     'checked'` in Silk.
>
> --
> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="8f49vvMW5QMJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+...@googlegroups.com
> <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="8f49vvMW5QMJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+unsubscribe@...>.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

Herby Vojčík


Richard Eng wrote:
> Btw, this is a good way to test the checkbox state:
>
> ||
> '#Checkbox'asJQuery prop:'checked'

Yes, jQuery prop is one of the possibilities to get to the property of the element.

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

Dave Mason-3
In reply to this post by Herby Vojčík
On Wed, Jun 3, 2015 at 4:52 PM, Herby Vojčík <[hidden email]> wrote:
Errata: `Silk INPUT << {'type' -> 'checkbox'. 'checked' -> 'checked' }`. It should be a plain dynamic array, which is just put on the stream one element after another (and association sets an attribute), a HashedCollection is not processed specially.

I just read your Medium post on Silk.  Quite nice!

You could use DNU further to say:

    Silk INPUT TYPE: 'checkbox' CHECKED: 'checked'

which would make it even cleaner and more declarative.

../Dave

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Checkbox

Herby Vojčík


Dave Mason wrote:

> On Wed, Jun 3, 2015 at 4:52 PM, Herby Vojčík <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Errata: `Silk INPUT << {'type' -> 'checkbox'. 'checked' ->
>     'checked' }`. It should be a plain dynamic array, which is just
>     put on the stream one element after another (and association sets
>     an attribute), a HashedCollection is not processed specially.
>
>
> I just read your Medium post on Silk.  Quite nice!
>
> You could use DNU further to say:
>
>     Silk INPUT TYPE: 'checkbox' CHECKED: 'checked'

No, since I would need to know if it is a tag or an attribute (compare with `row TD INPUT: 'Username:'`).
Attributes are implemented via putting an association on a stream, which is IMO nice as well.

>
> which would make it even cleaner and more declarative.
>
> ../Dave

--
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.