Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #28261 > unrolled thread

Best way to show create different elements dynamically

Started byJiiPee <no@notvalid.com>
First post2015-07-05 01:02 +0100
Last post2015-07-05 10:03 +0100
Articles 14 on this page of 34 — 7 participants

Back to article view | Back to comp.lang.javascript


Contents

  Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 01:02 +0100
    Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 01:06 +0100
      Re: Best way to show create different elements dynamically Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-05 09:27 +0200
        Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 10:04 +0100
      Re: Best way to show create different elements dynamically danca <cyberdanny@tiscalinet.it> - 2015-07-05 10:10 +0200
        Re: Best way to show create different elements dynamically Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-05 10:22 +0200
          Re: Best way to show create different elements dynamically danca <cyberdanny@tiscalinet.it> - 2015-07-05 11:43 +0200
            Re: Best way to show create different elements dynamically Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-05 13:16 +0200
              Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 12:48 +0100
              Re: Best way to show create different elements dynamically danca <cyberdanny@tiscalinet.it> - 2015-07-05 14:47 +0200
                Re: Best way to show create different elements dynamically Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-05 16:03 +0200
                  Re: Best way to show create different elements dynamically danca <cyberdanny@tiscalinet.it> - 2015-07-05 19:53 +0200
                    Re: Best way to show create different elements dynamically Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-06 01:46 +0200
                      Re: Best way to show create different elements dynamically "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-06 07:29 +0200
          Re: Best way to show create different elements dynamically Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2015-07-05 13:17 +0200
      Re: Best way to show create different elements dynamically "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-05 10:38 +0200
        Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 10:01 +0100
        Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 10:11 +0100
          Re: Best way to show create different elements dynamically Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-05 11:17 +0200
          Re: Best way to show create different elements dynamically "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-05 11:26 +0200
            Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 10:30 +0100
            Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 10:33 +0100
              Re: Best way to show create different elements dynamically "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-05 12:29 +0200
                Re: Best way to show create different elements dynamically danca <cyberdanny@tiscalinet.it> - 2015-07-05 12:38 +0200
                  Re: Best way to show create different elements dynamically "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-05 17:33 +0200
                    Re: Best way to show create different elements dynamically danca <cyberdanny@tiscalinet.it> - 2015-07-05 18:55 +0200
                      Re: Best way to show create different elements dynamically "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-05 19:44 +0200
                        Re: Best way to show create different elements dynamically danca <cyberdanny@tiscalinet.it> - 2015-07-05 20:42 +0200
                          Re: Best way to show create different elements dynamically "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-05 21:01 +0200
                Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 13:00 +0100
                  Re: Best way to show create different elements dynamically Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-05 16:13 +0200
                    Re: Best way to show create different elements dynamically Tim Streater <timstreater@greenbee.net> - 2015-07-05 15:23 +0100
                      Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 15:57 +0100
    Re: Best way to show create different elements dynamically JiiPee <no@notvalid.com> - 2015-07-05 10:03 +0100

Page 2 of 2 — ← Prev page 1 [2]


#28274

FromJiiPee <no@notvalid.com>
Date2015-07-05 10:30 +0100
Message-ID<yO6mx.70146$cg6.61234@fx02.am4>
In reply to#28273
On 05/07/2015 10:26, Evertjan. wrote:
> Why?
> Do you perhaps want to be considered "normal" yourself?
>
> Btw, "confirmation" usually ["normally"?] is used,
> when you provide the proposed way.
>
>

ye, but you know what I mean? :)
I mean: I want the be sure/check if the ways I was thinking are the ways 
people are doing it? better now? :)

[toc] | [prev] | [next] | [standalone]


#28275

FromJiiPee <no@notvalid.com>
Date2015-07-05 10:33 +0100
Message-ID<oR6mx.70147$cg6.49018@fx02.am4>
In reply to#28273
On 05/07/2015 10:26, Evertjan. wrote:
> JiiPee <no@notvalid.com> wrote on 05 Jul 2015 in comp.lang.javascript:
>
>> Just wanted a
>> confirmation what way people normally use.
> Why?
> Do you perhaps want to be considered "normal" yourself?
>
> Btw, "confirmation" usually ["normally"?] is used,
> when you provide the proposed way.
>
>

but, so are people here in agreement that the easiest way (as this time 
I would prefer an easy solution over efficiency maybe) would be using 
just innerHTML when callling onload? Or, is there another easy way which 
takes less efford?

I see there is also this createElement -way...

[toc] | [prev] | [next] | [standalone]


#28277

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-07-05 12:29 +0200
Message-ID<XnsA4CE7EFDAEC2Deejj99@194.109.6.166>
In reply to#28275
JiiPee <no@notvalid.com> wrote on 05 Jul 2015 in comp.lang.javascript:

> but, so are people here in agreement that the easiest way (as this time 
> I would prefer an easy solution over efficiency maybe) would be using 
> just innerHTML when callling onload? Or, is there another easy way which 
> takes less efford?

Agreement of others? 
That is the worst outcome of a discussion.

Try not to take the ideas of others for facts,
but consider their arguments on thier merits,
and make your own conclusions.

As far as I can see, 
you can use DOM-commands,
you can use innerHTML,
you can use serverside coding.

If feasable, I prefer the serverside solution,
as it is browser-independent.

I would use innerHTML for a quicky.

I would use the DOM for interactiveity.

> I see there is also this createElement -way...

As in Genesis 1:1 ?

That is not a differenw way, 
as you still need to do an appendChild()

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#28278

Fromdanca <cyberdanny@tiscalinet.it>
Date2015-07-05 12:38 +0200
Message-ID<mnb1b7$foi$1@dont-email.me>
In reply to#28277
Il 07/05/2015 12:29 PM, Evertjan. ha scritto:
> JiiPee <no@notvalid.com> wrote on 05 Jul 2015 in comp.lang.javascript:
>
>> but, so are people here in agreement that the easiest way (as this time
>> I would prefer an easy solution over efficiency maybe) would be using
>> just innerHTML when callling onload? Or, is there another easy way which
>> takes less efford?
>
> Agreement of others?
> That is the worst outcome of a discussion.
>

The point is that your work can be judged by someone. I find absolutely 
understandable that one may be curious or may want to be sure about the 
way other people see his work.
Even a lonely genius in his cubicle can come out with some wonderful 
thing, and then ask all around if there is a better way to do the same, 
or if he is reinventing the wheel, and so on.
Why are you always nitpicking people to impose your way of thinking?

Dan

[toc] | [prev] | [next] | [standalone]


#28290

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-07-05 17:33 +0200
Message-ID<XnsA4CEB2A87F647eejj99@194.109.6.166>
In reply to#28278
danca <cyberdanny@tiscalinet.it> wrote on 05 Jul 2015 in 
comp.lang.javascript:

>> Agreement of others?
>> That is the worst outcome of a discussion.
 
> The point is that your work can be judged by someone.

No, that is not "the" point,
that is just your meaning.

And that is a good thing.

Others may think differently,
and by reviewing their arguments, 
you can make your conclusions better

However, if you think it is nitpicking,
if others don't take your word for final,
yes, then your ability to learn from discussion 
will be minimized.  


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#28291

Fromdanca <cyberdanny@tiscalinet.it>
Date2015-07-05 18:55 +0200
Message-ID<mnbnet$v64$1@dont-email.me>
In reply to#28290
Il 07/05/2015 05:33 PM, Evertjan. ha scritto:
> danca <cyberdanny@tiscalinet.it> wrote on 05 Jul 2015 in
> comp.lang.javascript:
>
>>> Agreement of others?
>>> That is the worst outcome of a discussion.
>
>> The point is that your work can be judged by someone.
>
> No, that is not "the" point,
> that is just your meaning.
>

Pardon, but if [and we are] talking about "agreement of others" the 
point is "agreement of others" that implies judgement [of others]. 
Agreement or disagreement needs judgement, no? So my sentence is just a 
rephrasing, and your objection seems pointless.

On the other hand, I isolated a sentence, from an isolated sentence from 
you. Maybe the real thing is: <someone> is a bit pedantic [maybe it has 
somewhat been of some utility for this NG] and it was good when a 
zillion people entered this NG just to ask "how can I do this in 
jQuery?" but things now are different. See the traffic.

> And that is a good thing.
>
> Others may think differently,
> and by reviewing their arguments,
> you can make your conclusions better
>
> However, if you think it is nitpicking,
> if others don't take your word for final,
> yes, then your ability to learn from discussion
> will be minimized.
>

My ability to learn from discussions comes from the ability to extract 
the relevant parts, from not thinking that anyone has the "truth" in his 
pockets and from the inclination to not to be too serious in general [ 
and in major, too :-) ] about bytes and bites spreaded all around from 
an human being to other human beings.

(Not that I don't appreciate your suggestions, when they come.)

Dan

[toc] | [prev] | [next] | [standalone]


#28292

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-07-05 19:44 +0200
Message-ID<XnsA4CEC8E1D6BB7eejj99@194.109.6.166>
In reply to#28291
danca <cyberdanny@tiscalinet.it> wrote on 05 Jul 2015 in 
comp.lang.javascript:

> Pardon, but if [and we are] talking about "agreement of others" the 
> point is "agreement of others" that implies judgement [of others]. 

No. It just means that others agree, which is not a judgement,
nor does it mean that they are right.

Being right is not a result of judgement, btw.

> Agreement or disagreement needs judgement, no? 

No. It is just a statement.

However, agreement and disagreement are not important,
as they mean only something in authority thinking,
and sometimes by dogmatic thinking.

Truth can only be hoped for by comparing arguments,
and shifting those arguments by analizing other aarguments.  

> So my sentence is just a rephrasing,

Not so, because not true or important

> and your objection seems pointless.

"seem" is just a property of someone, in this case you.

> On the other hand, I isolated a sentence, from an isolated sentence from 
> you. 

So?

> Maybe the real thing is:

No, because this is whaat you come up with, and reality is not that.

>  <someone> is a bit pedantic [maybe it has 
> somewhat been of some utility for this NG] and it was good when a 
> zillion people entered this NG just to ask "how can I do this in 
> jQuery?" but things now are different. See the traffic.

You still and so wrongly assume that something is true 
because the number that think it is, is large.

[..]

> My ability to learn from discussions comes from the ability to extract 
> the relevant parts, from not thinking that anyone has the "truth" in his 
> pockets and from the inclination to not to be too serious in general [ 
> and in major, too :-) ] about bytes and bites spreaded all around from 
> an human being to other human beings.

You seem to think highly of yourself, and your abilities.

So you think if someone sounds more serious to you, and less irritating, his 
arguments must be better?

Wat nonsense, one should, imho, measure arguments on their inner contents, 
on their logic, and on the basis of the validity of facts and probabilities 
such arguments use as a base.


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#28295

Fromdanca <cyberdanny@tiscalinet.it>
Date2015-07-05 20:42 +0200
Message-ID<mnbtno$nkf$1@dont-email.me>
In reply to#28292
Il 07/05/2015 07:44 PM, Evertjan. ha scritto:
> danca <cyberdanny@tiscalinet.it> wrote on 05 Jul 2015 in
> comp.lang.javascript:
>
>> Pardon, but if [and we are] talking about "agreement of others" the
>> point is "agreement of others" that implies judgement [of others].
>
> No. It just means that others agree, which is not a judgement,
> nor does it mean that they are right.
>

You are short on demonstrate that to agree is not a judgement, nor via 
logic nor via psychology. What do you think it is "to agree"?. "Accept 
without criticism" is what you seems to think about. Maybe we are having 
some semantic misunderstanding. "To agree" means usually that someone 
evaluates and then takes the decision to side on the agreed 
concept/sentence/idea, "to accept", or "to submit himself" or some other 
phrasing that makes clear that one is prone to someone other's judgement 
and does not put a single word in between is not "to agree" AFAIK.

> Being right is not a result of judgement, btw.
>

You seems to think that absolute values exist.
To be concrete, consider that if you are the only one that says one 
thing, against the world, you are actually wrong. No matter if in a 
couple of centuries the world possibly will admit your rightness. You'll 
get burned the same as Savonarola, in between. And after another couple 
of centuries they will again say that you were wrong...

>> Agreement or disagreement needs judgement, no?
>
> No. It is just a statement.

I don't follow you [and I am answering, offtopic, because I know about
the tolerance this NG always showed to off-topics]

>
> However, agreement and disagreement are not important,
> as they mean only something in authority thinking,
> and sometimes by dogmatic thinking.
>

As I was supposing, we are on different positions about the meaning of 
"to agree".

> Truth can only be hoped for by comparing arguments,
> and shifting those arguments by analizing other aarguments.

For sure, and keeping in mind the relative meaning of "Truth"

>
> You still and so wrongly assume that something is true
> because the number that think it is, is large.

Idealism vs. realism.

>> My ability to learn from discussions comes from the ability to extract
>> the relevant parts, from not thinking that anyone has the "truth" in his
>> pockets and from the inclination to not to be too serious in general [
>> and in major, too :-) ] about bytes and bites spreaded all around from
>> an human being to other human beings.
>
> You seem to think highly of yourself, and your abilities.

This seems [from a cold point of view] an ad-hominem argument, a 
personal attack, a pointless and gratuitous consideration. Come on, you 
can do better! [a backfiring ad-personam counter-argument, I know].

>
> So you think if someone sounds more serious to you, and less irritating, his
> arguments must be better?

Interesting. It's part of our human nature. Yes, we tend to react to 
harsh impositions and to accept mellow lies. Here should make its case 
the rationality [logic].

>
> Wat nonsense, one should, imho, measure arguments on their inner contents,
> on their logic, and on the basis of the validity of facts and probabilities
> such arguments use as a base.
>
>
Agreed [after thinking, evaluating, and found no objections :-) ].

Dan

[toc] | [prev] | [next] | [standalone]


#28296

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-07-05 21:01 +0200
Message-ID<XnsA4CED5EAF248Ceejj99@194.109.6.166>
In reply to#28295
danca <cyberdanny@tiscalinet.it> wrote on 05 Jul 2015 in 
comp.lang.javascript:

> What do you think it is "to agree"?. "Accept 
> without criticism"

No.
 
There is no conceding there, perhaps acceding.

To agree [upon arguments] is to consent, 
to have the same meaning or logic.

[To agree can also mean to please or to satisfy]

Anyway, agreeing over arguments does not mean much,
unless you want that being used as an authoritive source 
for others or for later. 

It is the growing understanding that comes from discussion over and adding 
arguments that is important.

You are free to disagree, but without arguments, that does not mean much.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#28282

FromJiiPee <no@notvalid.com>
Date2015-07-05 13:00 +0100
Message-ID<m%8mx.42508$wt4.21534@fx41.am4>
In reply to#28277
On 05/07/2015 11:29, Evertjan. wrote:

>
> As far as I can see,
> you can use DOM-commands,
> you can use innerHTML,
> you can use serverside coding.

Right. good to know. I guess my point is that what is the easiest at 
this moment. Currently seems like innerHTML would do it... also people 
do not seem to strongly be against it.

Was just thinking that do people in js use the position technique like 
in C++ graphics, but seems that no. Thats what I wanted to know.

But good to know all options, can study /use then in the future.

>
>
>> I see there is also this createElement -way...
> As in Genesis 1:1 ?

heh, ye... the creation of things, isnt it? "and the element was created" :)

>
> That is not a differenw way,
> as you still need to do an appendChild()
>

[toc] | [prev] | [next] | [standalone]


#28286

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-07-05 16:13 +0200
Message-ID<2923116.0Dodfl0Stv@PointedEars.de>
In reply to#28282
JiiPee wrote:

> On 05/07/2015 11:29, Evertjan. wrote:
>> As far as I can see,
>> you can use DOM-commands,
>> you can use innerHTML,
>> you can use serverside coding.
> 
> Right. good to know. I guess my point is that what is the easiest at
> this moment.

That depends on your abilities.  Since you are still not able to post 
properly, despite hints as to that, the chances that this is not over
your head are slim.

> Currently seems like innerHTML would do it... also people
> do not seem to strongly be against it.

I strongly suggest you start learning to think (for) yourself.  Having 
accomplished that, you will be able to make an informed judgement, and
will stop asking the not-at-all smart question of “what people normally 
use”.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#28287

FromTim Streater <timstreater@greenbee.net>
Date2015-07-05 15:23 +0100
Message-ID<050720151523210474%timstreater@greenbee.net>
In reply to#28286
In article <2923116.0Dodfl0Stv@PointedEars.de>, Thomas 'PointedEars'
Lahn <PointedEars@web.de> wrote:

>JiiPee wrote:
>
>> On 05/07/2015 11:29, Evertjan. wrote:
>>> As far as I can see,
>>> you can use DOM-commands,
>>> you can use innerHTML,
>>> you can use serverside coding.
>> 
>> Right. good to know. I guess my point is that what is the easiest at
>> this moment.
>
>That depends on your abilities.  Since you are still not able to post 
>properly, despite hints as to that, the chances that this is not over
>your head are slim.

He's perfectly able to post properly. You're just being a smartarse
with your ad hominem comments.

JiiPee: I suggest you ignore this sort of trash from PointyHead. He's a
well known pedant who thinks he owns this ng and thinks he somehow has
the right to order everyone around.

-- 
"Once you adopt the unix paradigm, the variants cease to be a problem - you
bitch, of course, but that's because bitching is fun, unlike M$ OS's, where 
bitching is required to keep your head from exploding." - S Stremler in afc

[toc] | [prev] | [next] | [standalone]


#28289

FromJiiPee <no@notvalid.com>
Date2015-07-05 15:57 +0100
Message-ID<aBbmx.37548$qT4.8224@fx42.am4>
In reply to#28287
On 05/07/2015 15:23, Tim Streater wrote:
> In article <2923116.0Dodfl0Stv@PointedEars.de>, Thomas 'PointedEars'
> Lahn <PointedEars@web.de> wrote:
>
>>
>> That depends on your abilities.  Since you are still not able to post 
>> properly, despite hints as to that, the chances that this is not over
>> your head are slim.
>
> He's perfectly able to post properly. You're just being a smartarse
> with your ad hominem comments.
>
> JiiPee: I suggest you ignore this sort of trash from PointyHead. He's a
> well known pedant who thinks he owns this ng and thinks he somehow has
> the right to order everyone around.

heh, ... its ok, people are different -maybe he did not like it, so he 
is free/(has right to) not to answer-, nothing serious/personal for me.

Nice to have this kind of active forum. c++ forum works nicely as well.



[toc] | [prev] | [next] | [standalone]


#28269

FromJiiPee <no@notvalid.com>
Date2015-07-05 10:03 +0100
Message-ID<7q6mx.194337$1K1.156539@fx06.am4>
In reply to#28261
On 05/07/2015 01:02, JiiPee wrote:
> I use javascript to first create <p>-text lines inside a div (using 
> innerHTML). Then after that text I would like to show a table 
> (<table>). What is the best way to do this? Should I somehow put a 
> element (like a div) at the last text place and then check its 
> position and move the table to that position? Or possible adding just 
> table to that innerHTML like I did with the text? I know there are 
> several ways to do this, but how people normally do this? thank you

Just to clarify that this dynamical creation is done when the page 
loads; I call this operation currently from onload-function.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.javascript


csiph-web