DB data incompletely writing to text box

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default DB data incompletely writing to text box

    Hello all,

    I am having trouble getting all the data in a database field to write to a
    text box.
    The data is being pulled from an Access database's table and is being written
    to an HTML text box. The data does have a couple of double quotes in it, and
    the text box has all the data up to the double quotes ("). However, if I
    output it
    directly in the HTML page via output (not in any control like a text box), it
    does
    ok, and it does just fine when I use a <textarea> instead of a text box, too.

    Please see the code below. The last two attempts work, but the top attempt,
    using the text box, only gives me the data up to the first double quote ("),
    as in
    the following example:

    Sample data: This program likes "textareas"
    Text box result: This program likes

    Please help if possible!
    Thank you!


    <cfparam name="Catalog_Desc" default="" type="string">

    <html>
    <head>
    <title>Text Box Problem</title>
    </head>

    <body>

    <form>
    <cfoutput query="Creatures">
    <input name="try_again" type="text" id="try_again"
    value="#Creatures.Catalog_Desc#" size="60" maxlength="60">
    <br>
    <p>#Creatures.Catalog_Desc#</p>
    </cfoutput>

    <cfoutput query="Creatures">
    <textarea name="uglyduckling" cols="37" rows="1"
    onFocus="this.blur()">#Creatures.Catalog_Desc#</textarea>
    </cfoutput>

    </form>

    </body>
    </html>


    Xijitok Guest

  2. Similar Questions and Discussions

    1. Writing HTML data to XML
      I've been playing around with Phil's tutorial (http://www.macromedia.com/devnet/mx/flash/articles/flashpro_asp.html) and am trying to make a...
    2. writing rotation data to a file problem
      dear forum, i tried to write the camera position and rotation to a file, so i can use it in another programm. i am doing the following things:...
    3. Writing Data to external files
      Hi All, I need help writing data to external files. Do i need to download FileIO extra, or are there any built-in functions which i can use. ...
    4. Can I use PHP for selecting and writing data into a server-database?
      Hi, I like to build a small simple dinamic website: Point-of-sale (detail-shop), So entering stock, logging all sales, print out invoices and...
    5. reading/writing data in an INI
      Just a quick one How would I go about reading/writing data in an INI without importing it etc I need to read/write data into the win.ini file...
  3. #2

    Default Re: DB data incompletely writing to text box

    Hello all,

    This is the code that fixed the problem:

    <cfform>
    <cfoutput query="Creatures">
    <input name="try_again" type="text" id="try_again"
    value='#Creatures.Catalog_Desc#' size="60" maxlength="60"><br>
    </cfoutput>
    </cfform>

    Xijitok Guest

Posting Permissions

  • You may not post new threads
  • You may 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