Professional Web Applications Themes

Values in Text Boxes - Coldfusion - Getting Started

I am a bit confused on how to pass the value of text box to a url. I am able to do so with the select box and html buttons. My code looks like this <form method="post" action="SearchActionTest.cfm?value=Keyword.VALUE"> <p>Keyword: <input name="Keyword" size="40" type="text"> <input value="Search" name="Search" type="submit"></p> </form> I.e Someone will type in the word Auburn the url that should be dislplayed is [url]http://localhost/SearchActionTest?value=Auburn[/url] or if someone types in the word Norris it should disply [url]http://localhost/SearchActionTest?value=Norris[/url]...

  1. #1

    Default Values in Text Boxes

    I am a bit confused on how to pass the value of text box to a url. I am able to
    do so with the select box and html buttons.

    My code looks like this

    <form method="post"
    action="SearchActionTest.cfm?value=Keyword.VALUE">

    <p>Keyword: <input name="Keyword" size="40" type="text">
    <input value="Search" name="Search" type="submit"></p>

    </form>
    I.e Someone will type in the word Auburn the url that should be dislplayed is
    [url]http://localhost/SearchActionTest?value=Auburn[/url]
    or if someone types in the word Norris it should disply
    [url]http://localhost/SearchActionTest?value=Norris[/url]

    pinball4200 Guest

  2. #2

    Default Re: Values in Text Boxes

    How did you do it with the select box and buttons? The same general method should work with a text input.
    Dan Bracuk Guest

  3. #3

    Default Re: Values in Text Boxes

    Well the one for the buttons is done in the button because i can statically set
    it for each button. The Select box is containted in the code below

    <form name="form1" method="get"
    action="ShowClass.cfm?testclass=#GetClass.Speciali ty#">
    <select name="select">
    <cfoutput query="GetClass">
    <option value="#GetClass.Speciality#" <cfif
    (isDefined("GetClass.Speciality") AND GetClass.Speciality EQ
    GetClass.Speciality)>selected</cfif>>#GetClass.Speciality#</option>
    </cfoutput>

    </select>
    <input type="submit" value="Submit">
    </form>

    pinball420 Guest

  4. #4

    Default Re: Values in Text Boxes

    Just start appending the form values separated by ampersands. This
    action="ShowClass.cfm?testclass=#GetClass.Speciali ty#">

    becomes this
    action="ShowClass.cfm?testclass=#GetClass.Speciali ty#&name=#name.name#">

    For my own curiousity, why do you want to do this. The form variables will be
    available to your showclass template and there are better places to display the
    values than the url.

    Dan Bracuk Guest

Similar Threads

  1. Can we bind the values from cfselect to display thoseinto cfinput text boxes.
    By sharon212 in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: December 7th, 12:33 AM
  2. Pasting text with autoformatting in few text boxes
    By zaklada@gmail.com in forum Adobe Indesign Macintosh
    Replies: 2
    Last Post: March 29th, 08:24 AM
  3. Hyperlink text issue, two text boxes, one disfuntional
    By WickedSense webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 0
    Last Post: November 7th, 05:33 PM
  4. Make text boxes "forget" values
    By Emil Kvarnhammar in forum ASP.NET General
    Replies: 0
    Last Post: July 16th, 07:53 AM
  5. seperating columns in a text box into multiple text boxes?
    By Greg Doudna in forum Microsoft Access
    Replies: 1
    Last Post: July 9th, 08:12 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