javascript - Dynamically added input box problem? -


I've dynamically added the div. In which I have a text box. While adding a dynamic div I can put the value to the existing device but not the first open device. I would like to ask how to add value to the open text box before the devil.

Thanks

Here is a solution that is refreshing all (I can not understand the part of the "pre-open text box" section of your question. Okay, I understand it, but it does not appear in your code. I think the "rhythm" column of your table is a Input / Teterera is HTML element (since you use it).

Please note I do not know what the vitalset function should do, or "vitals_form_readings _1_rhythm ".

  function queryDb (statement) {dbQuery = new air. SQLStatement (); dbQuery.sqlConnection = db; dbQuery.text = statement //" SELECT * FROM rhythm "; // alert (DBteExt);) {dbQuery.execute () try; } Hold (error) {air.trace ("Error retrieving note from DB:", error); Air.trace (error.message); Return;} return (dbQuery.getResult ());} function crystals () {var statement = "select * from rhythm"; Return query db (statement) function read_speedcode () {if (! Cvitals) {var crhythms = chrythm (); Var i = 0; $ (Krithham) .each (function () {application = this.crhythm; var pr = 'card_' + i; $ ('# rhythm1'). Annexure (' & lt; td c Lass = "content_big" id = "'+ pr +'" name = "'+ pr +'" & gt; '+ Chromium +' & lt; / td> '); I ++}); }}); $ (Document) .ready (function () {read_speedcode ()} $ ('# rhythm1 .content_big') live ('click', function (event) {$ ('# rhythm1') blank () read_speedcode (); });});   

Now, there are many things about your code.

  1. Variable naming
  2. When you need a line, then read the full table
  3. Where is declared or assigned?
  4. Jquery is good for working with string parsing elements, there should be no need to parse "pr" to recover the line number.
  5. If a click is inserted in the table table (or deleted) before your synchronization, the validet argument fails. You may want to use table ID instead.
  6. Make sure "# vitals_form_readings_1_rhythm" is unique, has not been recovered from the table.

    If you can answer my question from me at the top of this post (vitalset function, vitals_form_readings_1_rhythm, cvitals) I will try to improve the code.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -