0

i using the jqgrid . i have to do a simple calculation on EDIT and ADD modal dialog with text boxes , i have to get a value from one text box and i have to divide by 8 then i have to show an another textbox . I can able get the id of the textboxes (Not value ) . Then i try to alert the value of that text box ,but its not working ..

i try the following script

$(document).ready(function() {

       $("#editmodmyFirstGrid").on("change", '#pds', function(event) {

        alert('value is entered');

    });
 });

here #editmodmyFirstGrid is an id of the edit dialogue box , and #pds is assigned to text box id.

hserusv
  • 976
  • 1
  • 7
  • 17

1 Answers1

0

If i really understood your question, you need to calculate the second text-box value based on first text-box value. I am not sure what is the role of jQgrid here. You can calculate the second text-box value like this,

$(document).ready(function() {
    $("#calculatedValue").val($("#actualValue").val()/8);
});

And the respective html part looks like,

<input type="text" id="actualValue" value="800" />
<input type="text" id="calculatedValue" />

The working Demo.

Let me know if this helps. Please read the How do I ask a good question section before you post any question.

Community
  • 1
  • 1
Vinoth Krishnan
  • 2,925
  • 6
  • 29
  • 34