Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Repeat same value till last textbox

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #243981
    nachi
    Participant

    Hi,

    I plan to repeat the double clicked textbox value to end of textbox. My form contains ten text box with 10 different values. If I click the third textbox the value of third textbox should repeat till 10th textbox. Please find the code below.

    http://codepen.io/nachicode/pen/dXKaaA/

    #243992
    Paulie_D
    Member

    It would be nice if you made some attempt to code this for yourself.

    We’re nice people but this just seems lazy.

    #244006
    nachi
    Participant

    Oops! Sorry I forget to include in the post. Here I tried one.

    $(document).ready(function() {
    $(‘td input’).on(‘dblclick’, function() {
    var currentRow = $(this).closest(‘tr’),
    laterSiblingRows = currentRow.nextAll().addBack(),
    laterInputs = laterSiblingRows.find(‘input’);
    laterInputs.val(this.value);
    })
    });

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.