select option & change page

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default select option & change page

    I am trying to use a drop down menu to switch pages based on the users
    selection. I get the error that 'year_select' is not defined. What cam I
    doing wrong? thanks Here is my code' <CFFORM name='changeyear'
    action='#year_select#' method='post'> <select name='year_select'
    onChange='this.form.submit()'> <option value='' selected='selected'></option>
    <option value='index.cfm'>2004/2005</option> <option
    value='03-04.cfm'>2003/2004</option> </select> </CFFORM>

    TheScarecrow Guest

  2. Similar Questions and Discussions

    1. getting data from select name-option value
      I can?t seem to solve this problem. On my First page (index) I create a query that populates an option value (or list) box. When the user selects a...
    2. [PHP] <Select><option......></select>
      On Wednesday 23 July 2003 02:16, Etienne Mathot wrote: If I understand you correctly, this is in fact an HTML question. To make a drop down box...
    3. Select/Option
      hi! i just want to ask on how will i load the other version of file written in another language (e.g Japanese)upon selecting that particular...
    4. De-Select Option Group Check Box
      How do I allow users to de-select a check box in an option group after they've selected it?
    5. Select option on right click
      I have a simple select form element object and want to be able to get it to select whatever the user chooses when they right-click in it. I've...
  3. #2

    Default Re: select option & change page

    The action value should be the cfm page you want to goto not #year_select#.

    eastinq Guest

  4. #3

    Default Re: select option & change page

    Sorry, I just realized what you're trying to do. Here is what you need.



    <CFFORM name="changeyear" action="" method="post">
    <select name="year_select" onChange="this.form.action=this.value;
    this.form.submit()">
    <option value="" selected="selected"></option>
    <option value="index.cfm">2004/2005</option>
    <option value="03-04.cfm">2003/2004</option>
    </select>
    </CFFORM>

    eastinq Guest

  5. #4

    Default Re: select option & change page

    Thanks that works great
    TheScarecrow 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