Forums

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

Home Forums JavaScript Add Custom Number to input name=

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #192383
    wolfgang1983
    Participant

    I would like to know. What is the best way that can make javascript detect if there is a new input name= and then be able to make do some thing like this <input name=”userfile<?php echo $id;?>”

    #192384
    Paulie_D
    Member

    It’s not clear to me what you are trying to do.

    Where would this ‘new’ input come from?

    #192391
    wolfgang1983
    Participant

    When I click on my add row button it ads a row and I need to generate a id for each new row in my tbody.

    Also I wanted to post some code on here but when submit form it blocked it I can not seem to paste code on here.

    #192392
    Paulie_D
    Member

    You can always show us in Codepen however my first thought is just to have a variable that increments as each input is added.

    I’m not sure why each ‘row’ in a table needs an ID though.

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