drop down menu probs again

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

  1. #1

    Default drop down menu probs again

    Hi Everyone - I had this drop down menu working fine then ive somehow disturbed
    it and it wont work properly
    I want a user to be able to choose an item from each menu then search by that
    query. If i have chosen something in every menu it does a search but simple
    pulls the whole list in regards to the Area search. Sorry to mikerroo who
    initially helped me solve this - i have been back many times but have stuffed
    something up.

    I also want the user to be able to choose 'any'



    <cfparam name="PageNum_get_area" default="1">
    <cfparam name="PageNum_urlpass" default="1">
    <!--- check that an area and langauge were selected, if not return to the
    previous page --->
    <CFIF form.area EQ '' or Form.language EQ '' or Form.Department EQ''>
    <CFLOCATION URL="healthsapporoindex.cfm">
    <CFABORT>
    </CFIF>

    <!--- all good, so do query --->
    <cfquery name="urlpass" datasource="dependent">
    SELECT hospital_name, hospital_id, EnglishAddress, JapaneseAddress, NihongoName
    FROM tHHbyL
    WHERE group_id = '#form.area#'
    <!--- Either select a specific language or ALL languages. --->
    <CFIF IsNumeric (form.Language)>
    AND language_id = <CFQUERYPARAM cfsqltype="cf_sql_integer"
    value=#form.Language#>
    AND department_id = <CFQUERYPARAM cfsqltype="cf_sql_integer"
    value=#form.Department#></CFIF>

    </cfquery>


    Menu code
    <li> <div id="SELECT" > <FORM ACTION="dropdownresult.cfm" METHOD="POST"
    Name="myform">





    <div align="center"><BR>
    <select name="Area" >
    <option value="">Area</option>

    <option value="Chuo Ku">Chuo Ku</option>
    <option value="Shiroishi Ku">Shiroishi</option>
    <option value="Teine Ku">Teine Ku</option>
    <option value="Minami Ku">Minami Ku</option>
    <option value="Kita Ku">Kita Ku</option>
    <option value="Higashi Ku">Higashi Ku</option>
    <option value="Nishi Ku">Nishi Ku</option>
    <option value="Kiyouta Ku">Kiyouta Ku</option>
    </select>
    <BR>
    <BR>


    <SELECT NAME="Language" SIZE="1">
    <OPTION VALUE="">Language</OPTION>
    <option value="any">ANY</option>
    <OPTION VALUE="English">English</OPTION>
    <OPTION VALUE="Spanish">Spanish</OPTION>
    <OPTION VALUE="Portuguese">Portuguese</OPTION>
    <OPTION VALUE="Japanese">Japanese</OPTION>
    <OPTION VALUE="Korean">Korean</OPTION>
    <OPTION VALUE="Russian">Russian</OPTION>
    <OPTION VALUE="Tagalog">Tagalog</OPTION>

    </SELECT>

    <BR>
    <BR>
    <SELECT NAME="Department" SIZE="1" >
    <OPTION VALUE="">Department</OPTION>
    <option value="any">ANY</option>
    <OPTION VALUE="Allergy Specialist">Allergy Specialist</OPTION>
    <OPTION VALUE="Anethesiology">Anethesiology</OPTION>
    <OPTION VALUE="Bronchoesopagology">Bronchoesopagology</OPTION>
    <OPTION VALUE="Cardiology">Cardiology</OPTION>
    <OPTION VALUE="Cardiosurgery">Cardiosurgery</OPTION>
    <OPTION VALUE="Dentristry">Dentristry</OPTION>
    <OPTION VALUE="Dental&OralSurgery">Dental Surgery</OPTION>
    <OPTION VALUE="Dermatology">Dermatology</OPTION>
    <OPTION VALUE="Emergency">Emergency</OPTION>
    <OPTION VALUE="GeneralHospital">General Hospital</OPTION>
    <OPTION VALUE="Gynecology">Gynecology</OPTION>
    <OPTION VALUE="InternalMedicine">Internal Medicine</OPTION>
    <OPTION VALUE="Neurology">Neurology</OPTION>
    <OPTION VALUE="Neurosurgery">Neurosurgery</OPTION>
    <OPTION VALUE="Obstetrics">Obstetrics</OPTION>
    <OPTION VALUE="Ophthalmology">Ophthalmology</OPTION>
    <OPTION VALUE="Orthopedics">Orthopedics</OPTION>
    <OPTION VALUE="Otolaryngology">Otolaryngology</OPTION>
    <OPTION VALUE="Pediatrics">Pediatrics</OPTION>
    <OPTION VALUE="PediatricDentristry">Pediatric Dentristry</OPTION>
    <OPTION VALUE="PlasticSurgery">Plastic Surgery</OPTION>
    <OPTION VALUE="Proctology">Proctology</OPTION>
    <OPTION VALUE="Psychiatrics">Psychiatrics</OPTION>
    <OPTION VALUE="Psyschosomatic">Psyschosomatic</OPTION>
    <OPTION VALUE="Pulmonology">Pulmonology</OPTION>
    <OPTION VALUE="Rehabilitation">Rehabilitation</OPTION>
    <OPTION VALUE="Resuscitology">Resuscitology</OPTION>
    <OPTION VALUE="Surgery">Surgery</OPTION>
    <OPTION VALUE="Urology">Urology</OPTION>
    <OPTION VALUE="Venerology">Venerology</OPTION>
    </SELECT>

    quiero mas Guest

  2. Similar Questions and Discussions

    1. Drop Down Menu for Pay Pal
      I just signed up for Pay Pal to use on my order page on my web site for selling merch. In Dreamweaver, I have made a table with columns for each...
    2. drop down menu
      Do anyone know the way to create this kinda drop down menu as shown at the right hand side, http://www.macromedia.com/software/flash/. Thanks for any...
    3. Drop down menu help
      I've used 3 of dreamweavers drop down boxes on my page. I would like to know if its at all possible to have the selected items from the list open in...
    4. Drop Down Menu?
      I am very new to FlashMX. (Just opened the program about a week ago and have spent time doing the lessons) Is it possible to create a mouse over...
    5. How do I build Drop Down menu using Menu magic with Database result
      Hi Every One. I resently purched Menu Magic Dropdown System. I would like to list my database content like news( few sentense with link ), Authers...
  3. #2

    Default Re: drop down menu probs again

    reeearoy thanks for your help
    this is the situation
    <cfparam name="PageNum_get_area" default="1">
    <cfparam name="PageNum_urlpass" default="1">
    <!--- check that an area and langauge were selected, if not return to the
    previous page --->
    <CFIF form.area EQ '' or Form.language EQ '' or Form.Department EQ ''>
    <CFLOCATION URL="healthsapporoindex.cfm">
    <CFABORT>
    </CFIF>

    <!--- all good, so do query --->
    <cfquery name="urlpass" datasource="dependent">
    SELECT hospital_name, hospital_id, EnglishAddress, JapaneseAddress, NihongoName
    FROM tHHbyL
    WHERE group_id = '#form.area#'
    <!--- Either select a specific language or ALL languages. --->

    AND language_id = <CFQUERYPARAM cfsqltype="cf_sql_varchar"
    value=#form.Language#>
    AND department_id = <CFQUERYPARAM cfsqltype="cf_sql_varchar"
    value=#form.Department#>

    </cfquery>
    Still can't get the query to do what i want - no error just want do a search
    like this

    area chuo ku
    language any
    department emergency

    if i search like this i get results - but i get all the records for Chuo ku

    Regards Mark

    quiero mas 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