Professional Web Applications Themes

passing data between pages... one has a drop down form - Coldfusion - Getting Started

I need to pass a zip code from a drop down form on one .cfm (passing.cfm) to another. How does the receiving page (receiving.cfm) understand which zip code was selected from the drop down? (I am using two elements in my access database... id, and Zip_Code and they both are sitting in a table called area_stats) I have this write up in my SQL on a recordest called rs_zipcode on my passing.cfm page... SELECT id, Zip_Code FROM area_stats ORDER BY Zip_Code ASC on my receiving.cfm page I have this in the SQL in a recordest I call call rs_zipcodechose SELECT ...

  1. #1

    Default passing data between pages... one has a drop down form

    I need to pass a zip code from a drop down form on one .cfm (passing.cfm) to
    another. How does the receiving page (receiving.cfm) understand which zip code
    was selected from the drop down? (I am using two elements in my access
    database... id, and Zip_Code and they both are sitting in a table called
    area_stats) I have this write up in my SQL on a recordest called rs_zipcode
    on my passing.cfm page... SELECT id, Zip_Code FROM area_stats ORDER BY
    Zip_Code ASC on my receiving.cfm page I have this in the SQL in a recordest I
    call call rs_zipcodechose SELECT id, Zip_Code FROM area_stats WHERE id =
    #FORM.Zip_Code# Now when I run a test on this recordset and enter an ID number
    physically it works great! I just need to know how to pass that ID from the
    drop down on the previous page. I've been trying for two days now :( (like
    always with these basics) but I'm sure once I get the basics I can build.
    Please help.

    AWZ Guest

  2. #2

    Default Re: passing data between pages... one has a drop downform

    This one sounds like basic HTML. On the dropdown page, create an HTML form.
    <form name='zipForm' action='processing.cfm' Method='POST'> <select
    name='zipcode'> <option value='90210'>90210</option> </select> <input
    type='submit' value='Submit Form'> </form> Then the processing page will be
    able to access FORM.zipcode.

    sdwebguy99 Guest

  3. #3

    Default Re: passing data between pages... one has a drop downform

    I see how to do this using html but I want to do it dynamically with a
    database. There are other variables I want related with the zip code they
    choose that is held in the database. Thus, the drop sown list needs dynamically
    filled.... which I know how to do... I just don't know how to pass that choice
    to page 2 where the zip code would act as the primary key of a database
    bringing up other dynamic data. How does the zip code selection pass?:confused;

    AWZ Guest

  4. #4

    Default Re: passing data between pages... one has a drop down form

    you need to use sql and reference the form name : form.zip_code (if
    zip_code is the name of your form field) All fields passed by a form can be
    referenced with the form scope

    "AWZ" <webforumsusermacromedia.com> escribió en el mensaje
    news:d31put$kfh$1forums.macromedia.com...
    >I see how to do this using html but I want to do it dynamically with a
    > database. There are other variables I want related with the zip code they
    > choose that is held in the database. Thus, the drop sown list needs
    > dynamically
    > filled.... which I know how to do... I just don't know how to pass that
    > choice
    > to page 2 where the zip code would act as the primary key of a database
    > bringing up other dynamic data. How does the zip code selection
    > pass?:confused;
    >

    Ed Guest

  5. #5

    Default Re: passing data between pages... one has a drop downform

    You are a good man Ed. THANK YOU!!!!
    AWZ Guest

Similar Threads

  1. loss of interactive form field data with insert pages
    By James_Hedges@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 5
    Last Post: August 3rd, 11:40 AM
  2. help needed in flash form data passing to cfm page
    By braulio! in forum Coldfusion Flash Integration
    Replies: 0
    Last Post: February 2nd, 01:20 AM
  3. Help! - Passing form data between multiple pages
    By xfl in forum Macromedia ColdFusion
    Replies: 2
    Last Post: May 13th, 06:19 PM
  4. Passing Data between CF and Java pages
    By Mike Paim in forum Coldfusion - Advanced Techniques
    Replies: 5
    Last Post: May 4th, 02:54 PM
  5. Form data - drop down values/display option
    By Tom Petersen in forum ASP
    Replies: 2
    Last Post: September 8th, 06:59 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