Monday 15 April 2013

javascript - Cannot append a select box with JQuery -


Start with

: I'm very new to Front End Dev (this was added to my Java backend work :)) . I have a model that opens to a page with two rows on one line - each has 2 inputs and a selection box. If you click a button ... it should add another line with the same element. They use it to do this: There is a table footer in which the elements were hidden (starting with line: & lt; tr & gt;), then when you click on the button, this table body And says. Then call attr on three elements and rename the id and name. For some reason if the footer is unknown ... the dropdown works, but not the copied version. We have examined names, values ​​etc. Values ​​presented in HTML ... The dropdown is not open yet.

So now what I'm trying to do ... which I think is cleaner is making a variable with Html ... and adds that every button is clicked on. But the tag of the selected element has been written ... so I do not know that this is a problem, but every time I try and add it to the mix ... there are errors about the unexpected token (

  var newRow = '& lt; Tr & gt; + '& Lt; Td nowrap = "nowrap" & gt; & Lt; Strong> Research & lt; / Strong> & Lt; Input class = "amount input-small" style = "margin-top: 8px; margin-bottom: 0;" Type = "text" /> gt; '+' & Lt; Td nowrap = "nowrap" style = "padding-top: 7px;" & Gt; '+' & Lt; Dfm: catombobox cssClass = "Input-Medium" id = "category id_tite" name = "classname test" show empty category = "true" show group = "true" value = "" gt; '+' & Lt; / Td> '+' & Lt; Td> & Lt; Input class = "input-media" style = "margin-top: 8px; margin-bottom: 0;" & lt; / Td> & Lt; / Td> & Lt; Td> & Lt; One class = "remove" href = "#" & gt; & Lt; I class = "icon-remove" & gt; & Lt; / Type = "text" I & gt; & Lt; / A & gt; & Lt; / Td> '+' & Lt; / Tr & gt; '; $ ("# Mytable tbody") Attachment (newRow);    

Try using instead of dfm: catombobox

No comments:

Post a Comment