Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31395
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: For 2 dynamically generated TD |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <3d7fdf4b-ac1c-49e0-815d-8bd26d5b1f91@googlegroups.com> <XnsA6866E981898eejj99@194.109.6.166> <2fc26c4d-7513-4b09-acbf-b046cb11fc71@googlegroups.com> |
| Date | 2016-09-17 13:56 +0200 |
| Message-ID | <XnsA6868DDBF8CF8eejj99@194.109.6.166> (permalink) |
justaguy <lichunshen84@gmail.com> wrote on 17 Sep 2016 in
comp.lang.javascript:
> Ok, here's the code.
Showing the dynamic code is not minimalistic
and does not explain [to me] what you mean by
">> > the second TD left aligned to the first TD?"
I would suggest you show a minimalistic **html** example of this,
perhaps from the F12 rendering?
>
> // creating row and creating all cells
> // creates a table row
> var newrow = document.createElement("tr");
> newrow.setAttribute('style','td {padding: 10px}');
This seems strange, btw, wouldn't that result in
<tr style='td {padding: 10px}'>
which seems not the way of inline CSS.
> // cell 1
> var cell = document.createElement("td");
Is this a repeating var declaration?
> cell.colSpan = "2";
> // cell.setAttribute('style','padding: 10px');
> var cellText = document.createElement('input');
> cellText.type = 'text';
> cellText.id = 'fLabel';
> cellText.name = 'fLabel';
> cellText.size = "20";
> cell.appendChild(cellText);
> newrow.appendChild(cell);
>
> // cell 2
> var cell = document.createElement("td");
It seems it is.
> cell.colSpan = "3";
> var cellText = document.createElement('input');
> cellText.type = 'text';
> cellText.id = 'fValue';
> cellText.name = 'fValue';
> cellText.size = "80";
> cell.appendChild(cellText);
> newrow.appendChild(cell);
>
> // code to append the new TR to table
> // ...
>
>
> Additionally, the page is complex, it has tons of other stuff, tons of
> dynamically generated elements before and after. thanks
>
> On Saturday, September 17, 2016 at 4:52:41 AM UTC-4, Evertjan. wrote:
>> justaguy <.com> wrote on 17 Sep 2016 in
>> comp.lang.javascript:
>>
>> > How to set the first TD left aligned and
>> > the second TD left aligned to the first TD?
>>
>> 'left aligned', imho,
>> is an internal effect of text [and other inline elements]
>> in a container, like in a <td>.
>>
>> You better give a minimalisitc working example.
>>
>> --
>> Evertjan.
>> The Netherlands.
>> (Please change the x'es to dots in my emailaddress)
>
>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
For 2 dynamically generated TD justaguy <lichunshen84@gmail.com> - 2016-09-16 18:58 -0700
Re: For 2 dynamically generated TD "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-17 10:52 +0200
Re: For 2 dynamically generated TD justaguy <lichunshen84@gmail.com> - 2016-09-17 04:45 -0700
Re: For 2 dynamically generated TD justaguy <lichunshen84@gmail.com> - 2016-09-17 04:48 -0700
Re: For 2 dynamically generated TD "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-17 14:04 +0200
Re: For 2 dynamically generated TD justaguy <lichunshen84@gmail.com> - 2016-09-17 06:03 -0700
Re: For 2 dynamically generated TD "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-17 13:56 +0200
Re: For 2 dynamically generated TD Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-09-18 21:04 +0100
Re: For 2 dynamically generated TD "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-19 10:26 +0200
csiph-web