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

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

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

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. =?Utf-8?B?bWF2cmlja18xMDE=?=

    SetAuthCookie works some times and fails some times?

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    491
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 23, 2006
  2. =?Utf-8?B?bWF2cmlja18xMDE=?=

    Forms Authentication Fails some times and not some times???

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    476
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 28, 2006
  3. djskrill
    Replies:
    9
    Views:
    683
    djskrill
    Oct 1, 2003
  4. Peng Yu
    Replies:
    17
    Views:
    667
    Peng Yu
    Sep 14, 2008
  5. Jack Steven
    Replies:
    2
    Views:
    413
    Chris Rebert
    Mar 9, 2009
Loading...

Share This Page