javascript - trigger is causing an overwrite meaning wrong number is displayed in textbox -


I have installed a demo for this problem that you can access by clicking

  • Are there. Step 1: When you open the demo, click on the "Open grid" link and select the button "7". It will display a text box and 7 letter buttons below.
  • Step 2: Select the 2 letter button below the option (one button is selected when green is selected)
  • Step 3: Now you can add a green plus button Click on it, and click on it and it opens a modal window.
  • Step 4: In the modal window there is a search bar, type "AAA" and submit the search, you will see a bunch of rows. Step 5: In the first row, you have the number 1 in the "number" answer "column, click on the" Add "button in this line, the modal window will close, but the problem is because" the answer The number of "text box" 1 "does not display. It displays" 2 ", the reason for this is explained below:

Problem:

" Answer Number "in the text box, it should display number 1 in the row" Number of responses "column The number "1" was added to the number added under the field, but this text box does not display 1, it displays number 2 and the reason is showing this number I this line of code given below.

Now it is due to this code:

  $ ('. Answertxt', context) .val (context.find ('length ('. AnswerbtnsOn ') Length : '');  

in $ ('.gridbtns'). ('Click', function () but I need this code. / P>

I need this code , Because it is meant to say that the 7 letter button is "AG" and you will turn on all the letter button, the text box number "7" will display, but if I change my mind and I only use the 5 letter button "AE" , The text box will now only change to "5" from "7" to 5, but the tones are in order so I need this code.

So my question is if the user clicks on the "Add" button, then how can I get a number from the "Number of answers" column within the row can be displayed in the text box ?

Below I have a code where the number appears within the text box to display when the "Add" button is clicked on ...

  addwindow function (Number Enter, Grid Value, BTN) {$ ('# Main Number North TCT') Val (number north); $ ('# Btn' + gridValues) .trigger ('click'); }  

but $ ('# mainNumberAnswerTxt'). Val (number Answers); "$ ('# btn' + grid value). Trigger ('click');" As this line of code returns this function to $ ('.gridbtns') Turns on. ('Click', function () and the code in that function is given below, how many buttons are currently activated after the user clicks the grid button:

 < Code> $ ('. Answertxt', context) .val (reference ('. AnswerbtnsOn') Length & gt; 0? Context.find ('. AnswerbtnsOn') Length: '');,  


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -