1 Reply Latest reply on Sep 21, 2007 5:38 AM by Mikael Andersson

    dataTable JS simple question

    dudududu Novice

      I've a dataTable with 3 columns , each column has input box
      I would like to write a method that onblur change the value of the 3rd input box to be the 1st input box value+ the 2nd input box value...
      what is the ID/name of the 3rd input box(I would like to do it in JS)?
      in each line of the table it should be different id right...

      thank u!!

        • 1. Re: dataTable JS simple question
          Mikael Andersson Master

          make sure you define its id, and the id of the form if there is a form around it (and id for the table).

          Then you can simply view the source to figure out how the richfaces table generates the ids.

          If you have a from with the id myForm and inside that a table with the id aTable and on each row you have an inputText with the id myInput then I believe the generated ids are as follow:

          Row 1 id = myForm:aTable:0:myInput
          Row 2 id = myForm:aTable:1:myInput
          Row 3 id = myForm:aTable:2:myInput
          Row 4 id = myForm:aTable:3:myInput
          Row 5 id = myForm:aTable:4:myInput