Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #35736 > unrolled thread
| Started by | grooveegeezer@gmail.com |
|---|---|
| First post | 2018-10-06 11:56 -0700 |
| Last post | 2018-10-10 13:09 +0000 |
| Articles | 11 — 7 participants |
Back to article view | Back to comp.lang.javascript
appendChild not appending a GAP grooveegeezer@gmail.com - 2018-10-06 11:56 -0700
Re: appendChild not appending a GAP Dr.Kral@nyc.rr.com - 2018-10-06 18:02 -0400
Re: appendChild not appending a GAP grooveegeezer@gmail.com - 2018-10-08 10:21 -0700
Re: appendChild not appending a GAP Dr.Kral@nyc.rr.com - 2018-10-08 17:18 -0400
Re: appendChild not appending a GAP JJ <jj4public@vfemail.net> - 2018-10-07 14:09 +0700
Re: appendChild not appending a GAP Osmo Saarikumpu <osmo@weppipakki.com> - 2018-10-08 16:44 +0300
Re: appendChild not appending a GAP "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-10-08 16:59 +0200
Re: appendChild not appending a GAP Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-10-09 04:09 +0200
Re: appendChild not appending a GAP "Mark-" <nospam@mapson.xyz> - 2018-10-09 03:38 +0000
Re: appendChild not appending a GAP Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-10-10 05:33 +0200
Re: appendChild not appending a GAP "Mark-" <nospam@mapson.xyz> - 2018-10-10 13:09 +0000
| From | grooveegeezer@gmail.com |
|---|---|
| Date | 2018-10-06 11:56 -0700 |
| Subject | appendChild not appending a GAP |
| Message-ID | <d7b35f48-8702-4f4a-b040-f8248b82d048@googlegroups.com> |
I have 2 boxes on screen, just 2 DIVs, 1 below the other, with whatever styling. In the top one I have a checkbox, saying "Sex", and the one below that, "Nationality". When "Sex" is clicked, I want another line appear BELOW it, with radio buttons for M and F. I'm managing that fairly OK with appendChild, but it's not FORCING THE "NATIONALITY" LINE DOWN FURTHER to make way for the "M" and "F!! Rather the M is appearing on TOP of the "Nationality"! Naturally, I don't want this. What do I do? (do I have to spend hours doing some kind of <table> shit, and will even *that* work?) How does one append HTML, exactly? And also, if the "Sex" checkbox is clicked off (ie. the guy/girl doesn't want to declare his/her sex), the line must disappear, and "Nationality" move UP to recover the now-blank space.... How, please? Ooo my head hurts. Thanks.
[toc] | [next] | [standalone]
| From | Dr.Kral@nyc.rr.com |
|---|---|
| Date | 2018-10-06 18:02 -0400 |
| Message-ID | <cnbirdt58fgt8g83v0ggcsjvsa7sio84jt@4ax.com> |
| In reply to | #35736 |
On Sat, 6 Oct 2018 11:56:02 -0700 (PDT), grooveegeezer@gmail.com wrote in
<d7b35f48-8702-4f4a-b040-f8248b82d048@googlegroups.com>:
>I have 2 boxes on screen, just 2 DIVs, 1 below the other, with whatever styling. In the top one I have a checkbox, saying "Sex", and the one below that, "Nationality". When "Sex" is clicked, I want another line appear BELOW it, with radio buttons for M and F. I'm managing that fairly OK with appendChild, but it's not FORCING THE "NATIONALITY" LINE DOWN FURTHER to make way for the "M" and "F!! Rather the M is appearing on TOP of the "Nationality"! Naturally, I don't want this. What do I do? (do I have to spend hours doing some kind of <table> shit, and will even *that* work?) How does one append HTML, exactly?
>And also, if the "Sex" checkbox is clicked off (ie. the guy/girl doesn't want to declare his/her sex), the line must disappear, and "Nationality" move UP to recover the now-blank space.... How, please?
>
>Ooo my head hurts. Thanks.
Forget tables.
Forget Append.
Remember boxes.
Define a class {display:none;}
Use mouse things like onclick, onblur and onfocus to call a js function
that changes className of the elements.
[toc] | [prev] | [next] | [standalone]
| From | grooveegeezer@gmail.com |
|---|---|
| Date | 2018-10-08 10:21 -0700 |
| Message-ID | <11d04169-84dd-4c45-9870-5a5aa213da54@googlegroups.com> |
| In reply to | #35737 |
On Sunday, 7 October 2018 03:32:43 UTC+5:30, Dr....@nyc.rr.com wrote:
>
> Define a class {display:none;}
>
> Use mouse things like onclick, onblur and onfocus to call a js function
> that changes className of the elements.
Bro, this is Not Working. I got the element *appearing on a click* just fine, but it doesn't push down the next line :(
Do I have to change the padding-top of the line below or something, manually?? Ugh.
[toc] | [prev] | [next] | [standalone]
| From | Dr.Kral@nyc.rr.com |
|---|---|
| Date | 2018-10-08 17:18 -0400 |
| Message-ID | <k5inrdpspofr9d7kmot5as73n04374p5l6@4ax.com> |
| In reply to | #35752 |
On Mon, 8 Oct 2018 10:21:54 -0700 (PDT), grooveegeezer@gmail.com wrote in
<11d04169-84dd-4c45-9870-5a5aa213da54@googlegroups.com>:
>On Sunday, 7 October 2018 03:32:43 UTC+5:30, Dr....@nyc.rr.com wrote:
>
>>
>> Define a class {display:none;}
>>
>> Use mouse things like onclick, onblur and onfocus to call a js function
>> that changes className of the elements.
>
>Bro, this is Not Working. I got the element *appearing on a click* just fine, but it doesn't push down the next line :(
>
>Do I have to change the padding-top of the line below or something, manually?? Ugh.
I can't see anything wrong with your code from here and neither can anyone
else.
I suggest that you study a bit for you need to learn some basic manners
(like 'thank you' and 'please'). Also learn about the basic box model for
html layout.
When you set things up assign (temporary) background colors to each box so
that you can see what spacing adjutants are required.
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2018-10-07 14:09 +0700 |
| Message-ID | <1fyueao13wwlk$.lmrhhsnx7qlv.dlg@40tude.net> |
| In reply to | #35736 |
On Sat, 6 Oct 2018 11:56:02 -0700 (PDT), grooveegeezer@gmail.com wrote: > I have 2 boxes on screen, just 2 DIVs, 1 below the other, with whatever > styling. In the top one I have a checkbox, saying "Sex", and the one > below that, "Nationality". When "Sex" is clicked, I want another line > appear BELOW it, with radio buttons for M and F. I'm managing that fairly > OK with appendChild, but it's not FORCING THE "NATIONALITY" LINE DOWN > FURTHER to make way for the "M" and "F!! Rather the M is appearing on > TOP of the "Nationality"! Naturally, I don't want this. What do I do? Chances are that the first DIV has a fixed height which long enough to fit just the "Sex" checkbox. Extend it to fit the radio buttons too. If you want the DIV height to be dynamic, don't specify the height. i.e. let it expand automatically. > And also, if the "Sex" > checkbox is clicked off (ie. the guy/girl doesn't want to declare his/her > sex), the line must disappear, and "Nationality" move UP to recover the > now-blank space.... How, please? If you use `appendChild()` to add the radio buttons, use `removeChild()` to remove them. When creating each one of them, store it in an array, so that you can retrieve them later when they need to be removed.
[toc] | [prev] | [next] | [standalone]
| From | Osmo Saarikumpu <osmo@weppipakki.com> |
|---|---|
| Date | 2018-10-08 16:44 +0300 |
| Message-ID | <ppfn0b$7nb$1@dont-email.me> |
| In reply to | #35736 |
On 06/10/2018 21:56, grooveegeezer@gmail.com wrote: > ... And also, if the "Sex" checkbox is clicked off (ie. the guy/girl doesn't want to declare his/her sex)... Why is my "sex" (default reproductive role, or lack of, or unwillingness to answer) important to *you*? IOW, should you be asking that question at all? -- Best wishes, Osmo
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2018-10-08 16:59 +0200 |
| Message-ID | <XnsA975ACC9F493Beejj99@194.109.6.166> |
| In reply to | #35749 |
Osmo Saarikumpu <osmo@weppipakki.com> wrote on 08 Oct 2018 in comp.lang.javascript: > On 06/10/2018 21:56, grooveegeezer@gmail.com wrote: >> ... And also, if the "Sex" checkbox is clicked off (ie. the guy/girl >> doesn't want to declare his/her sex)... > > Why is my "sex" (default reproductive role, or lack of, or unwillingness > to answer) important to *you*? IOW, should you be asking that question > at all? Because you should make it possible to answer yes/no/maybe/later/stop. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-10-09 04:09 +0200 |
| Message-ID | <60469772-7d54-4e3f-e6b4-0bd822d1c843@PointedEars.de> |
| In reply to | #35749 |
Osmo Saarikumpu wrote: > On 06/10/2018 21:56, grooveegeezer@gmail.com wrote: >> ... And also, if the "Sex" checkbox is clicked off (ie. the guy/girl doesn't want to declare his/her sex)... > > Why is my "sex" (default reproductive role, or lack of, or unwillingness > to answer) important to *you*? IOW, should you be asking that question > at all? It can be important. However, in the modern world, we have grown past the oversimplifying distinction between only two gender identities, male and female (the recognition of a third gender, neither male nor female (hijras), in e.g. the Indian society since historical record keeping (Kama Sutra period, ca. 400 BCE to 200 CE) is evidence that not only non-binary gender identity is not a new development, but this distinction has actually never been true for humans). Users/customers will probably be offended, and will not use/buy, that do not need to be offended, by the false dilemma put to them. The clueless OP should follow the example of major service providers and give their users/customers an appropriate selection of choices (at the very least, “Other”). PointedEars -- > If you get a bunch of authors […] that state the same "best practices" > in any programming language, then you can bet who is wrong or right... Not with javascript. Nonsense propagates like wildfire in this field. -- Richard Cornford, comp.lang.javascript, 2011-11-14
[toc] | [prev] | [next] | [standalone]
| From | "Mark-" <nospam@mapson.xyz> |
|---|---|
| Date | 2018-10-09 03:38 +0000 |
| Message-ID | <pph7rj$191t$1@gioia.aioe.org> |
| In reply to | #35755 |
Thomas 'PointedEars' Lahn wrote: > Users/customers will probably be offended... > > PointedEars Only folks walking around looking for something to cause them offense. So I guess it includes PointedEars.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-10-10 05:33 +0200 |
| Message-ID | <bc71928a-3cc5-ea6a-eba3-c09b31165483@PointedEars.de> |
| In reply to | #35756 |
Mark- <nospam@mapson.xyz> wrote: > Thomas 'PointedEars' Lahn wrote: >> Users/customers will probably be offended... The sentence continues: “… and will not use/buy, that do not need to be offended, […]”. > Only folks walking around looking for something to cause them offense. You have no clue what you are talking about. There is a good reason why, for example, Facebook introduced the third choice, “User-defined”, some time ago, with further possibility to specificy the pronoun that should be used in references to the user (male: “him”; female: “her”; neutral: “him/her”). > So I guess it includes PointedEars. You are an idiot and a troll, which is basically the same thing. Fortunately, this is appropriately reflected in your anti-social, standards-violating, AUP-violating address munging, which makes it easy for me to killfile you. (You are so stupid, you are not even worth investing the time for an abuse report to aioe.org who should kick your sorry ass from here to Andromeda for this.) *PLONK* F’up2 poster PointedEars -- Danny Goodman's books are out of date and teach practices that are positively harmful for cross-browser scripting. -- Richard Cornford, cljs, <cife6q$253$1$8300dec7@news.demon.co.uk> (2004)
[toc] | [prev] | [next] | [standalone]
| From | "Mark-" <nospam@mapson.xyz> |
|---|---|
| Date | 2018-10-10 13:09 +0000 |
| Message-ID | <ppktm0$197q$1@gioia.aioe.org> |
| In reply to | #35763 |
Thomas 'PointedEars' Lahn wrote: > There is a good reason > why, for example, Facebook introduced the third choice, > You use the actions of FB to attempt to prove a point and I am the idiot. HA > You are an idiot and a troll, which is basically the same thing. Perhaps but, I am not an ass. Oh, and by the way, I was right, look at your response. You are always mad and looking to be offended to justify being an ass to folks.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web