Write one entry multiple times??

Discussion in 'ASP General' started by Mangler, Oct 27, 2006.

  1. Mangler

    Mangler Guest

    I created a barcode:
    <%
    RMABarCode = Request.Form("idrma")
    IF Len(RMABarCode) Then
    response.write "<img src='barcode.asp?code=" & RMABarCode &
    "&height=25&width=1&mode=code39'>"
    End If
    %>

    Does anyone know how to display that barcode multiple times through a
    variable?

    Say a user needs to print 4 of the above barcode, they would be able to
    enter the number of barcodes they need and it will display that many to
    be printed.

    Any kind of help is appreciated.

    Respectfully,

    Danny
     
    Mangler, Oct 27, 2006
    #1
    1. Advertisements

  2. Mangler

    Mike Brind Guest

    Add another field for the user to enter the number of times they want to
    print the barcode.

    <%
    RMABarCode = Request.Form("idrma")
    NoTimes = Request.Form("NoTimes")
    If Len(RMABarCode)>0 Then
    If IsNumeric(NoTimes) Then
    For i = 1 to NoTimes
    response.write "<img src='barcode.asp?code=" & RMABarCode &
    "height=25&width=1&mode=code39'><br>"
    Next
    End If
    End If
    %>
     
    Mike Brind, Oct 27, 2006
    #2
    1. Advertisements

  3. Mangler

    Mangler Guest

    Thanks for the reply.

    I got an error when the <br> is added and when I take it out it
    displays one continuous barcode.

    Any ideas?

    Respectfully,

    Danny
     
    Mangler, Oct 27, 2006
    #3
  4. Mangler

    Mike Brind Guest

    Not without some clue as to what error you got.
     
    Mike Brind, Oct 27, 2006
    #4
  5. Mangler

    Mangler Guest

    I played with it and got it to work. My only thing is it displays the
    barcode across like:

    (barcode) (barcode)

    How can i get it to show it like:

    (barcode)

    (bracode)

    Respectfully,

    Danny
     
    Mangler, Oct 27, 2006
    #5
  6. Mangler

    Mike Brind Guest

    By putting <br> back in.

    Or surrounding each image with <p>...</p>. (Or <div>... </div>)
     
    Mike Brind, Oct 27, 2006
    #6
  7. Mangler

    Mangler Guest

    We are good! Thanks for the help.

    Respecfully,

    Danny
     
    Mangler, Oct 27, 2006
    #7
    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.