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


Groups > comp.lang.javascript > #17436

Re: Problem w/ creating dynamic TR and its TDs

Message-ID <15075341.ROmfG5ADdx@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2012-12-03 22:53 +0100
Subject Re: Problem w/ creating dynamic TR and its TDs
Newsgroups comp.lang.javascript
References <e4c1bc98-b6a5-4142-a7a7-3fff318a7057@l12g2000vbj.googlegroups.com> <k9e45v$d6v$1@speranza.aioe.org> <5462881.fXVs31Ce0e@PointedEars.de> <17c6ca39-08f8-41b7-9d84-b1862cd6bd39@t5g2000vba.googlegroups.com>
Followup-To comp.lang.javascript

Followups directed to: comp.lang.javascript

Show all headers | View raw


justaguy wrote:
^^^^^^^^
Please fix that, this is not a Web forum.  And avoid Google Groups for 
posting, use a newsreader.

> Thomas 'PointedEars' Lahn wrote:
>> […]   The correct way to address the problem actually
>> posed by the question (as opposed to your answer) is:
>>
>> var input = document.createElement("input");
>> input.name = "partnumber" + cnt;
>> input.id = "partnumber" + cnt;
>> input.className = "autocomplete";
>> cell.appendChild(input);

Please trim your quotations to the relevant parts next time.

<http://jibbering.com/faq/notes/>

> @PointedEars,

(AISB.)  The thread and the attribution lines for the quotation levels make 
it clear already whose posting(s) you are referring to.

> I'm using your syntax,
> particularly, the input.className = "autocomplete" part.
> 
> So, the code looks like this:
> // cell 1
> var cell = document.createElement("td");
> var cellText = document.createElement('input');
> cellText.type = 'text';
> cellText.id = 'partnumber'+cnt;
> cellText.name = 'partnumber'+cnt;
> cellText.className = 'autocomplete';
> cell.appendChild(cellText);
> newrow.appendChild(cell);
> 
> […]
> Outcome or rendered HTML:
> First, new ROW of input type of text created and in correct position
> as expected.
> 
> <!-- rendered existing ROW -->
> <td>
> <input id="partnumber" class="autocomplete ui-autocomplete-input"
                                             ^^^^^^^^^^^^^^^^^^^^^
> type="text" name="partnumber" autocomplete="off" role="textbox" aria-
> autocomplete="list" aria-haspopup="true">
> </td>
> <!-- yes, the predefined element for autocomplete class call is
> successful as expected -->
> 
> 
> <!-- rendered dynamically created ROW -->
> <td>
> <input id="partnumber2" class="autocomplete" type="text"
> name="partnumber2">
> </td>
> <!-- no, the autocomplete class call fails -->
> 
> Browser: Firefox 16 for windows
> 
> What is wrong here?

jQuery UI Autocomplete, jQuery UI, and jQuery.  Avoid everything that has 
"jQuery" in it (any capitalization).


PointedEars
-- 
Sometimes, what you learn is wrong. If those wrong ideas are close to the 
root of the knowledge tree you build on a particular subject, pruning the 
  -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Problem w/ creating dynamic TR and its TDs justaguy <lichunshen84@gmail.com> - 2012-12-01 15:17 -0800
  Re: Problem w/ creating dynamic TR and its TDs Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-12-02 00:34 +0100
    Re: Problem w/ creating dynamic TR and its TDs justaguy <lichunshen84@gmail.com> - 2012-12-01 17:06 -0800
    Re: Problem w/ creating dynamic TR and its TDs Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-02 03:46 +0100
      Re: Problem w/ creating dynamic TR and its TDs justaguy <lichunshen84@gmail.com> - 2012-12-01 19:27 -0800
        Re: Problem w/ creating dynamic TR and its TDs Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-03 22:53 +0100
      Re: Problem w/ creating dynamic TR and its TDs Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-12-02 08:43 +0100
        Re: Problem w/ creating dynamic TR and its TDs Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-02 16:11 +0100
          Re: Problem w/ creating dynamic TR and its TDs Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-12-02 18:48 +0100
            Re: Problem w/ creating dynamic TR and its TDs Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-02 19:35 +0100
              Re: Problem w/ creating dynamic TR and its TDs Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-02 19:39 +0100

csiph-web