Professional Web Applications Themes

displaying values in a text box - ASP

I have some values I'm passing from one form to another. When I press the submit button, I want the quantity I have in the text box on form a to pass to and display in the text box on form b. form b is on an asp page, and I'm trying to display the values in this fashion: myquantity=request.form("quantity") response.write "<input type =text name=mybox value=" & myquantity & ">" However, this is not working, and I can't figure out why. What else could it be? Thanks, Bill...

  1. #1

    Default displaying values in a text box

    I have some values I'm passing from one form to another. When I press
    the submit button, I want the quantity I have in the text box on form
    a to pass to and display in the text box on form b.

    form b is on an asp page, and I'm trying to display the values in this
    fashion:

    myquantity=request.form("quantity")

    response.write "<input type =text name=mybox value=" & myquantity &
    ">"

    However, this is not working, and I can't figure out why.

    What else could it be?

    Thanks,

    Bill
    Bill Guest

  2. #2

    Default Re: displaying values in a text box

    Bill wrote on 09 sep 2003 in microsoft.public.inetserver.asp.general:
    > myquantity=request.form("quantity")
    >
    > response.write "<input type =text name=mybox value=" & myquantity &
    > ">"
    >
    > However, this is not working, and I can't figure out why.
    >
    When rendered in html, if myquantity has spaces, you are in trouble.

    response.write "<input name=mybox value='" & myquantity & "'>"

    or

    myquantity = "'" & myquantity & "'"
    response.write "<input name=mybox value=" & myquantity & ">"

    or

    <%
    myquantity=request.form("quantity")
    %>
    <input name="mybox" value="<%=myquantity%>">

    This last form is less apt to have mistakes like that.

    ==============

    Better make it a habit to put all values in HTML in quotes.
    Even: type="text" name="mybox"
    type="text" is default, can be left out.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan. Guest

Similar Threads

  1. Displaying multiple values - Hard to explain here...
    By MikeyJ in forum Macromedia ColdFusion
    Replies: 31
    Last Post: July 9th, 01:33 AM
  2. Displaying Values in CFChart Graph
    By hanzelmans in forum Coldfusion - Advanced Techniques
    Replies: 5
    Last Post: April 10th, 11:18 PM
  3. 3D text not displaying as 3D in .dcr nor .exe
    By peaceolah in forum Macromedia Director 3D
    Replies: 3
    Last Post: December 13th, 09:44 PM
  4. displaying text from an external text file
    By AstrA in forum Macromedia Flash
    Replies: 2
    Last Post: December 24th, 04:25 PM
  5. Replies: 2
    Last Post: July 9th, 07:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139