SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    queryPosition in <cfselect> tag

    Hi everyone,

    I am trying to create a drop-down list that popluates the data from a query and combines with <option> tag. I want the "Please select a vendor" on top and query data goes below: Here is my code:

    <cfselect NAME="dpdownVendors"
    query="qVendors"
    value="vendorID"
    display="displayVendor"
    queryposition="below"
    size="1" onClick="validateChkBox()">
    <option value="">Please select a vendor</option>
    </cfselect>

    Now, here comes the problem, when the program is run, it crashed showing:
    "Attribute validation error for tag CFSELECT.
    The tag does not allow the attribute(s) QUERYPOSITION. The valid attribute(s) are CLASS,DISPLAY,ID,MESSAGE,
    MULTIPLE,NAME,ONBLUR,ONCHANGE,ONCLICK,
    ONDBLCLICK,ONERROR,ONFOCUS,PASSTHROUGH,
    QUERY,REQUIRED,SELECTED,SIZE,STYLE,TABINDEX,VALUE."

    I know the bug is from "queryposition", just get lost how to debug it.
    Does anyone know the solution?

    Thanks much!!!

    Yee

  2. #2
    SitePoint Enthusiast davidorsini's Avatar
    Join Date
    Nov 2006
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try this...

    <select NAME="dpdownVendors">
    <option value="">Please select a vendor
    <cfloop query="qVendors">
    <option value="#qVendors.vendorID#">#qVendors.displayVendor#
    </cfloop>
    </select>
    David Orsini
    Atlanta, GA
    Georgia Tech

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Naughty, naughty davidorsini...make sure you close those option tags.

    And remember, the OP is using cfselect, which is a Coldfusion tag.

    Yee...what version of Coldfusion are you using? It looks as if the queryPosition attribute is new in Coldfusion 7. Here's a reference for the CFSELECT tag in CF6:
    http://livedocs.macromedia.com/coldf...32.htm#2553073
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    creole, thanks for your good point. I checked the version is 6, that explains why I can't use queryPosition.
    Anyway, I switched to use <select> tag, thanks davidorsini!

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to help...I've also been caught trying to use newer features (I'm running CF6 as well).
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  6. #6
    SitePoint Enthusiast davidorsini's Avatar
    Join Date
    Nov 2006
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by creole View Post
    Naughty, naughty davidorsini...make sure you close those option tags.
    DOH!
    David Orsini
    Atlanta, GA
    Georgia Tech


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
  •