Accumulating number on labels

Discussion in 'HTML and CSS' started by Tommyy, Oct 15, 2019.

  1. Tommyy

    Tommyy

    Joined:
    Oct 15, 2019
    Messages:
    1
    Likes Received:
    0
    Hi there,

    I am trying to work out how to add a number to each of my labels. For example; First label has a 1 on it, second label has a 2 on it, etc. But it needs to be dynamic/accumulating as there are always different amounts of labels being produced each time the program runs and only a single program per label. Hope that all makes sense.

    Attached is an example of the final product (1_LabelsProgram.txt) and both files for creating (LabelProgram.txt and LabelsProgram.txt)

    Also attached what I'm trying to get it to look like (label with numbers.png)

    Thanks a lot!!
     

    Attached Files:

    Tommyy, Oct 15, 2019
    #1
    1. Advertisements

  2. Tommyy

    TheCodingForums

    Joined:
    Oct 29, 2019
    Messages:
    4
    Likes Received:
    0
    This forum is HTML.
    You question sound as PHP/ASP/Python...

    You want use JavaScript ?
    Why not do this with PHP, ASP, JSP ?
     
    TheCodingForums, Oct 29, 2019
    #2
    1. Advertisements

  3. Tommyy

    ishan_shah

    Joined:
    Nov 8, 2019
    Messages:
    1
    Likes Received:
    0
    Hi,
    You can print numbers dynamically on the labels using javaScript. You can take a variable that gives you the count of labels and then you can print it with the name of the label.
     
    ishan_shah, Nov 11, 2019 at 3:25 AM
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.