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

    "Mangler" <> wrote in message
    news:...
    >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.
    >


    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
     
    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

    "Mangler" <> wrote in message
    news:...
    > 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?
    >


    Not without some clue as to what error you got.

    --
    Mike Brind
     
    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

    "Mangler" <> wrote in message
    news:...
    >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)


    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

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. loveNUNO
    Replies:
    2
    Views:
    1,210
    loveNUNO
    Nov 20, 2003
  2. Timo Nentwig

    one element multiple times

    Timo Nentwig, May 25, 2004, in forum: XML
    Replies:
    0
    Views:
    441
    Timo Nentwig
    May 25, 2004
  3. AtomicBob
    Replies:
    14
    Views:
    1,258
    Toby Inkster
    May 2, 2006
  4. Jack Steven
    Replies:
    2
    Views:
    669
    Chris Rebert
    Mar 9, 2009
  5. Raith

    Using the same User Control multiple times on one page

    Raith, Jul 6, 2005, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    1,399
  6. Mike Owen

    Allowing entry of a Carriage Return during data entry

    Mike Owen, Jul 27, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    1,114
    Alessandro Zifiglio
    Jul 27, 2006
  7. Mangler

    Display one object multiple times

    Mangler, Oct 27, 2006, in forum: ASP General
    Replies:
    1
    Views:
    135
    Mangler
    Oct 27, 2006
  8. Noozer
    Replies:
    2
    Views:
    501
    Dr John Stockton
    Aug 1, 2005
Loading...