Professional Web Applications Themes

Drop down menu help - Macromedia Dynamic HTML

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 a new chromeless window. Thanks...

  1. #1

    Default 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 a new chromeless window. Thanks
    ikle_pixie Guest

  2. #2

    Default drop down menu help

    Been trying hard to sort out this but to not luck.
    post from a search page with a simple drop down menu populated witha
    distinctly.
    anway cant get the results to appear in the results page please check out my
    code -if you can hekp me ill buy you a beer.

    <cfquery name="Distinct" datasource="simple">
    SELECT Area
    FROM Simple
    </cfquery>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>search</title>
    <link rel="stylesheet" href="hs.css" type="text/css">
    <meta http-equiv="Content-Type" content="text/html; cht=shift_jis">
    </head>

    <body>

    <form name="form1" method="post" action="try5.cfm">
    <label>
    <input type="submit" name="Submit" value="Submit">
    <select name="select">
    <cfoutput query="Distinct">
    <option value="#Distinct.Area#" <cfif (isDefined("Distinct.Area") AND
    Distinct.Area EQ Distinct.Area)>selected</cfif>>#Distinct.Area#</option>
    </cfoutput> </select>
    </label>
    </form>


    </body>
    </html>

    result page

    <cfparam name="FORM.Area" default="1"><cfquery name="try2" datasource="simple">
    SELECT Area
    FROM Simple</cfquery>
    <cfquery name="try7" datasource="simple">
    SELECT LastName
    FROM Simple
    WHERE Area LIKE '%#FORM.Area#%'</cfquery>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>try5</title>
    <meta http-equiv="Content-Type" content="text/html; cht=shift_jis">
    </head>

    <body>
    <cfoutput>#try7.LastName#</cfoutput>
    </body>
    </html>

    quiero mas Guest

  3. #3

    Default Re: drop down menu help

    Your form does not have an input called area, so on your action page, the
    cfparam tag is setting the value to 1.

    By the way, you have way too much code for what your are trying to accomplish.

    Originally posted by: quiero mas
    Been trying hard to sort out this but to not luck.
    post from a search page with a simple drop down menu populated witha
    distinctly.
    anway cant get the results to appear in the results page please check out my
    code -if you can hekp me ill buy you a beer.

    <cfquery name="Distinct" datasource="simple">
    SELECT Area
    FROM Simple
    </cfquery>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>try5</title>
    <meta http-equiv="Content-Type" content="text/html; cht=shift_jis">
    </head>

    <body>
    <cfoutput>#try7.LastName#</cfoutput>
    </body>
    </html>



    Dan Bracuk Guest

  4. #4

    Default Re: drop down menu help

    thanks for your comments - i appreciate the advice. I am very new to this as
    you may have gathered. Do you know of any examples of code that i can have a
    look at? I will actually be trying to make this a multiple menu. I am trying
    to set up a bilingual health information site (non0 profit) for non japanese
    living here in Hokkaido. I want them to be able to filter their search by four
    or five menus. I really appreciate you taking the time to look and i am a man
    of my word. next time we hook up the beers are on me

    Regards Mark

    quiero mas Guest

  5. #5

    Default Re: drop down menu help

    Here is your form code
    <form name="form1" method="post" action="try5.cfm">
    <label>
    <input type="submit" name="Submit" value="Submit">
    <select name="select">
    <cfoutput query="Distinct">
    <option value="#Distinct.Area#" <cfif (isDefined("Distinct.Area") AND
    Distinct.Area EQ Distinct.Area)>selected</cfif>>#Distinct.Area#</option>
    </cfoutput> </select>
    </label>
    </form>

    You don't need the label tags. They can go.
    Also, with the query you have now, all that cfif stuff inside your option tag
    is unnecessary, so it can go.
    Finally, you need an input tag named area. Change the name of your select tag
    from select to area.

    Here is your result page.
    <cfparam name="FORM.Area" default="1">
    <cfquery name="try2" datasource="simple">
    SELECT Area
    FROM Simple</cfquery>

    <cfquery name="try7" datasource="simple">
    SELECT LastName
    FROM Simple
    WHERE Area LIKE '%#FORM.Area#%'</cfquery>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>try5</title>
    <meta http-equiv="Content-Type" content="text/html; cht=shift_jis">
    </head>

    <body>
    <cfoutput>#try7.LastName#</cfoutput>
    </body>
    </html>


    The cfparam is fine, but, what you should do is to use a cfif tag to send the
    user to your form if the value is actually 1. That's because they didn't
    submit the form.

    Query try2 is unnecessary, it can go.
    In query try7, change this
    WHERE Area LIKE '%#FORM.Area#%'</cfquery>
    to this
    WHERE Area = '#FORM.Area#'
    </cfquery>
    I assume you only want the record that matches what the user submitted.

    Your cfoutput should now show you the last name.



    Dan Bracuk Guest

  6. #6

    Default Re: drop down menu help

    Dan thank you very much for your help - things are now flowing smoothly - my
    next challenge is to work out a multiple filter
    e.g area, closest subway, medical department, woman doctor, english speaking
    doctor and/or appointment not necessary

    ideally someone can filter their search by one or all of these or some combo
    in between - is this going to difficult or just a little fiddly. I appreciate
    you taking the time to answer and hope i can help someone else in the future

    best regards
    Mark



    quiero mas Guest

Similar Threads

  1. drop down menu
    By biteapple webforumsuser@macromedia.com in forum Macromedia Dynamic HTML
    Replies: 48
    Last Post: May 5th, 12:49 PM
  2. Drop Down Menu for Pay Pal
    By steelstrings06 in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: September 26th, 10:09 PM
  3. Drop Down Menu in DW
    By skowhegan in forum Macromedia Dynamic HTML
    Replies: 4
    Last Post: February 18th, 04:05 PM
  4. How do I build Drop Down menu using Menu magic with Database result
    By Shaiju V Raman webforumsuser@macromedia.com in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: November 20th, 02:51 PM
  5. Drop Down Menu vs Mac
    By loadmovie webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 3
    Last Post: September 7th, 01:20 AM

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