Cfselect within a cfgridcolumn

Is there a way to combine a <cfselect> within a <cfgridcolumn> in a <cfgrid> table?
Here's what I'm looking to do.  I would have a <cfgrid> with First Name, Last Name and then a column with States.  The States column within the <cfgrid> would be popluated by a query listing all the states.
<cfgrid>
First Name     Last Name    State
John               Doe              AL  (dropdown list of states)
Jane               Doe              MO (dropdown list of states)
</cfgrid>

You can't do it with a key. You have to use the little magnifier thing to get the cursor to the left of the letter. Put your finger on the word, and hold it for a moment, and small magnifying glass appears. You can the roll your finger to get the cursor to move.

Similar Messages

  • Cfbind within a cfselect - How to have multiple values in display propery?

    I am binding a cfselect tag to a CFC, it's working as expected but I want to have more than one value populating the display="" part of the 2nd cfselect.The CFC returns a query of company information based off of the activty_id sent in.
    This is what I currently have (roughly):
    <cfajaxproxy cfc="mysite.templates.cfc.companies">
    (this is working fine)
    <cfselect name="activity_id" bind="cfc:mysite.templates.cfc.companies.fncActivity()" display="activity_name" value="activity_id" bindonload="yes" />
    Here's where I want to display more than one value. This works as shown below but I want display="company_name company_city company_state" in the cfselect instead.
    <cfselect name="company_id" bind="cfc:mysite.templates.cfc.companies.fncCompany({activity_id})" display="company_name" value="company_id" />
    In debugging the CFC I am getting this returned:
    Bind failed for select box company_id, columns matching the value or  display attributes specified on the cfselect tag are not present in the  query
    Is this possible?

    The display attribute can only reference a single column. Concatentate the values together under a single column in your query. Then use the new column name in your bind.

  • Default values within cfgridcolumn

    Hi,
    I was wondering whether or not there is a way to pass a
    default value into a <cfgridcolumn> whenever a new row is
    inserted. I am using <cfgridupdate> and I need to pass a
    foreign key ID based on the usersID alongside any data they enter
    into the record. Any help or advice would be appreciated.

    Just in case anyone else is having this problem, I have
    managed to solve it.
    Not sure if it was the "Correct" way to solve it but it
    works.
    I needed to pass a foreign key value (based on the users
    login) as a default value into each new record in the DataGrid. The
    method i used was to create a hidden text box on the page, i passed
    the variable into the text box and then used the following code to
    bind it to the record.
    onchange="gridMainBusinessObjectives.dataProvider.editField(gridMainBusinessObjectives.sel ectedIndex,'companyID',hidCompanyID.text);"
    The above code is part of the grids onChange event
    "hidCompanyID" is the name of the hidden text box containing
    my foreign key
    I hope this can be of some use to anyone who is having the
    same problem I was having.

  • Cfselect (format="flash") doesn't render with addition of "onChange" attribute

    The following code renders fine without the "onChange"
    attribute, but when I add the "onChange" attribute it no longer
    appears on the screen. I'm new to <cfform>, so any help would
    be appreciated!
    <cfselect name="select_project"
    label="Select Project"
    query="qMenuWrProject"
    value="work_rqst_nbr"
    display="display_desc"
    required="yes"
    multiple="no"
    width="500"
    onChange="this.form.submit();"
    />

    Let me put it another way.
    open the page in FF
    right-click within the document and choose View Page Source
    in the pop-up window, click ../SpryAssets/SpryAccordion.js
    You will see
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <HTML><HEAD>
    <TITLE>404 Not Found</TITLE>
    </HEAD><BODY>
    <H1>Not Found</H1>
    The requested URL /SpryAssets/SpryAccordion.js was not found on this server.<P>
    <HR>
    <ADDRESS>Apache/1.3.37 Server at www.tc.umn.edu Port 80</ADDRESS>
    </BODY></HTML>
    This means that the document cannot be found.
    I could also put it another way by translating ../SpryAssets/SpryAccordion.js as http://www.tc.umn.edu/SpryAssets/SpryAccordion.js
    click on the latter and see what happens
    now click on http://www.tc.umn.edu/~aias/SpryAssets/SpryAccordion.js
    Gramps

  • Cfgrid prepopulate cfselect

    I have trouble prepolualting cfselect in the flash form. When
    i click on the cfgrid I want specific drop down to be prepopulated
    (i have 18 of them) based on the type.
    Here is my cfgrid
    <cfgrid name="myGrid" query="tempQuery" height="445"
    width="200" rowheaders="false" onchange="#getComboBoxValue#">
    <cfif menuQuery.menuID is not lloc>
    <cfgridcolumn name="menuID" header="menuID" display="no"
    />
    <cfgridcolumn name="label" header="label" />
    <!--- <cfgridcolumn name="link" header="link"
    />--->
    <cfset lloc= menuQuery.menuID>
    </cfif>
    </cfgrid>
    And here is the drop downs
    <cfloop index="i" list="#lLIst#">
    <cfscript>
    LoadaccessLevelType =
    createObject("component","Erik.maintenace").LoadaccessLevelType(#i#);
    </cfscript>
    <cfselect query="LoadaccessLevelType" value="accessLevel"
    display="description" name="access#i#" width="200"
    label="#LoadaccessLevelType.display#"/>
    </cfloop>
    Where lList is number from 1 to 18.
    My actionScript is here
    <cfsavecontent variable="getComboBoxValue">
    <cfloop query="TempQuery">
    <cfif TempQuery.accessType neq ''>
    //Set a temp variable to hold the current comboBox value
    var temp1;
    //Loop through all the comboBox values
    for(var i = 0; i < access#accessType#.length; i++){
    //if (myGrid.selectedItem.accessType == temp1) {
    //set the comboBox to the current index
    access#accessType#.selectedIndex=i;
    //set temp to the value of the comboBox
    temp1=access#accessType#.value;
    //if temp equals the selected clientID then stop looping
    through the comboBox
    if(temp1==myGrid.selectedItem.accessValue){
    break;
    </cfif>
    </cfloop>
    </cfsavecontent >

    There are too many things going on: function call on an
    object instance, actionscript function stored in a variable and the
    grid itself. It is difficult to debug. I would start by using an
    actual query to test the code.

  • Bind in form works with cfinput, how to with cfselect and a href

    Hi all
    This code workks binding a cfinput in an HTML cfform:
    Name:<cfinput type="text" name="FIRSTNAME" label="Name" required="yes" width="150" bind="{UsersGrid.FIRSTNAME}" >
    However this href doesn't seem to bind correctly:
    <a  href="http://www.google.com/search?hl=en&output=search&sclient=psy-ab&q={UsersGrid.COMPANY}&btnK=" bind="{UsersGrid.COMPANY}">Google.com</a>
    This cfselect doesn't either:
    Department: <cfselect name="DEPARTMENT1" width="100" size="1" label="Department" required="yes" bind="UsersGrid.DEPARTMENT1">
    <option></option><cfoutput query="dNames"><option value="#DEPARTMENTIDS#">#DEPARTMENTNOM#</option></cfoutput>
    </cfselect> 
    How can I make them both work? Thank you

    Sure, Aaaron here it is, it uses the same database tables and datasource as in the other thread:
    <cfquery name="QNAMES" datasource="tester">
        select * from company, industries, division
    where company.SECTORS1 = industries.SECTORSIDS
    <cfif structKeyExists(url,"sectorid")>
    and industries.SECTORSIDS = #url.sectorid#</cfif>
    and division.DEPARTMENTIDS = company.DEPARTMENT1
    and company.WHEN = 2
    ORDER BY company</cfquery>
    <cfquery name="dNames" datasource="tester">
        select DEPARTMENTIDS, DEPARTMENTNOM
        from division
    order by DEPARTMENTNOM</cfquery>
    <CFQUERY name="industries" datasource="tester">
    SELECT * FROM industries
    </CFQUERY>
    <CFQUERY name="salesstep" datasource="tester">
    SELECT * FROM sales
    </CFQUERY>
    <CFQUERY name="xity" datasource="tester">
    SELECT * FROM ciudad
    </CFQUERY>
    <CFQUERY name="hols" datasource="tester">
    SELECT * FROM holidays
    </CFQUERY>
    <!--- UPDATE QUERY --->
    <cfif isDefined("FORM.UPDATEADDBTN")>
    <cfif FORM.ENTID GTE 1>
    <cfset isCOMPANYNull = iif(len(trim(FORM.COMPANY)) EQ 0, true, false)>
    <cfset isSECTORS1Null = iif(len(trim(FORM.SECTORS1)) EQ 0, true, false)>
    <cfset isRANKINGNull = iif(len(trim(FORM.RANKING)) EQ 0, true, false)>
    <cfset isPRICENull = iif(len(trim(FORM.PRICE)) EQ 0, true, false)>
    <cfset isDEPARTMENT1Null = iif(len(trim(FORM.DEPARTMENT1)) EQ 0, true, false)>
    <cfset isFIRSTNAMENull = iif(len(trim(FORM.FIRSTNAME)) EQ 0, true, false)>
    <cfset isPOSNull = iif(len(trim(FORM.POS)) EQ 0, true, false)>
    <cfset isPHONENull = iif(len(trim(FORM.PHONE)) EQ 0, true, false)>
    <cfset isEMAILNull = iif(len(trim(FORM.EMAIL)) EQ 0, true, false)>
    <cfset isMOBILENull = iif(len(trim(FORM.MOBILE)) EQ 0, true, false)>
    <cfset isADDRESSNull = iif(len(trim(FORM.ADDRESS)) EQ 0, true, false)>
    <cfset isCITYNull = iif(len(trim(FORM.CITY)) EQ 0, true, false)>
    <cfset isCOMMENTSNull = iif(len(trim(FORM.COMMENTS)) EQ 0, true, false)>
    <cfset MEETINGDATE = trim(FORM.ABUNDANCE)>
    <!--- DATECFM--->
    <cfset isMTGTNull = iif(len(trim(FORM.MTGT)) EQ 0, true, false)>
    <cfset isSTATE1Null = iif(len(trim(FORM.STATE1)) EQ 0, true, false)>
    <CFQUERY name="updatecompany" datasource="tester">
    update COMPANY
    SET COMPANY = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMPANY)#" null="#isCOMPANYNull#" />,
       SECTORS1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.SECTORS1)#" null="#isSECTORS1Null#" />,
       RANKING = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.RANKING)#" null="#isRANKINGNull#" />,
       PRICE = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.PRICE)#" null="#isPRICENull#" />,
       DEPARTMENT1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.DEPARTMENT1)#" null="#isDEPARTMENT1Null#" />,
       FIRSTNAME = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.FIRSTNAME)#" null="#isFIRSTNAMENull#" />,
       POS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.POS)#" null="#isPOSNull#" />,
       PHONE = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.PHONE)#" null="#isPHONENull#" />,
       EMAIL = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.EMAIL)#" null="#isEMAILNull#" />,
       MOBILE= <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MOBILE)#" null="#isMOBILENull#" />,
       ADDRESS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.ADDRESS)#" null="#isADDRESSNull#" />,
       CITY = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.CITY)#" null="#isCITYNull#" />,
       COMMENTS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMMENTS)#" null="#isCOMMENTSNull#" />,
       ABUNDANCE = <cfqueryparam cfsqltype="cf_sql_timestamp" value="#MEETINGDATE#" />,
       MTGT = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MTGT)#" null="#isMTGTNull#" />,
       STATE1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.STATE1)#" null="#isSTATE1Null#" />
    WHERE ENTID = #FORM.ENTID#
    </CFQUERY>
    <CFLOCATION URL="testht.cfm?begin=1">
    <cfelse>
    <cfset isCOMPANYNull = iif(len(trim(FORM.COMPANY)) EQ 0, true, false)>
    <cfset isSECTORS1Null   = iif(len(trim(FORM.SECTORS1)) EQ 0, true, false)>
    <cfset isRANKINGNull = iif(len(trim(FORM.RANKING)) EQ 0, true, false)>
    <cfset isPRICENull = iif(len(trim(FORM.PRICE)) EQ 0, true, false)>
    <cfset isDEPARTMENT1Null = iif(len(trim(FORM.DEPARTMENT1)) EQ 0, true, false)>
    <cfset isFIRSTNAMENull = iif(len(trim(FORM.FIRSTNAME)) EQ 0, true, false)>
    <cfset isPOSNull = iif(len(trim(FORM.POS)) EQ 0, true, false)>
    <cfset isPHONENull = iif(len(trim(FORM.PHONE)) EQ 0, true, false)>
    <cfset isEMAILNull = iif(len(trim(FORM.EMAIL)) EQ 0, true, false)>
    <cfset isMOBILENull = iif(len(trim(FORM.MOBILE)) EQ 0, true, false)>
    <cfset isADDRESSNull = iif(len(trim(FORM.ADDRESS)) EQ 0, true, false)>
    <cfset isCITYNull = iif(len(trim(FORM.CITY)) EQ 0, true, false)>
    <cfset isCOMMENTSNull = iif(len(trim(FORM.COMMENTS)) EQ 0, true, false)>
    <cfset isMTGTNull = iif(len(trim(FORM.MTGT)) EQ 0, true, false)>
    <cfset isSTATE1Null = iif(len(trim(FORM.STATE1)) EQ 0, true, false)>
    <cfset MEETINGDATE = trim(FORM.ABUNDANCE)>
    <!--- DATECFM --->
    <!--- ADD COMPANY QUERY --->
    <CFQUERY name="addcompany" datasource="tester">
    INSERT INTO COMPANY(
    COMPANY,
    SECTORS1,
    RANKING,
    PRICE,
    DEPARTMENT1,
    FIRSTNAME,
    POS,
    PHONE,
    EMAIL,
    MOBILE,
    ADDRESS,
    CITY,
    COMMENTS,
    ABUNDANCE,
    MTGT,
    STATE1
    VALUES (
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMPANY)#" null="#isCOMPANYNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.SECTORS1)#" null="#isSECTORS1Null#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.RANKING)#" null="#isRANKINGNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.PRICE)#" null="#isPRICENull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.DEPARTMENT1)#" null="#isDEPARTMENT1Null#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.FIRSTNAME)#" null="#isFIRSTNAMENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.POS)#" null="#isPOSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.PHONE)#" null="#isPHONENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.EMAIL)#" null="#isEMAILNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MOBILE)#" null="#isMOBILENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.ADDRESS)#" null="#isADDRESSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.CITY)#" null="#isCITYNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMMENTS)#" null="#isCOMMENTSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_timestamp" value="#MEETINGDATE#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MTGT)#" null="#isMTGTNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.STATE1)#" null="#isSTATE1Null#" />
    </CFQUERY>
    <!---DATE_FORMAT(datetime_field_name,'%Y-%m-%d');--->
    <CFLOCATION URL="testht.cfm?begin=1">
    </cfif>
    </cfif>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>Sales</title> 
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="formst.css" type="text/css" media="screen" />
    </head>
    <cfdump var=#qnames#>
    <cfajaxproxy bind="javascript:myHandler({UsersGrid.COMPANY},{UsersGrid.SECTORS1},{UsersGrid.DEPARTMENT 1})"/>
    <script type="text/javascript">
      function myHandler(COMPANY,SECTORS1,DEPARTMENT1) {
          //update the link's href
          document.getElementById('myLink').href = 'http://www.google.com/search?q=' + COMPANY;
          document.getElementById('Linkedin').href = 'http://www.google.com/search?q=linkedin' + COMPANY;
          //update SECTORS1's selected
          var theField = document.getElementById('SECTORS1');
          for(var i=0; i<theField.options.length; i++) {
              if(theField.options[i].value==SECTORS1) {
                  theField.options[i].selected = true;
              } else {
                  theField.options[i].selected = false;
    </script>
    <!--- TOP --->
    <body>
    <div>
    <cfform name="SFORM" FORMAT="html"  width="1000" height="400" style="margin-left:140px;">
    <cfgrid name="UsersGrid"
               FORMAT="html"
               query="QNAMES" width="920" height="200" rowheaders="No" striperows="yes" striperowcolor="fefefe">
    <cfgridcolumn name="RANKING" width="40"header="Rank">
    <cfgridcolumn name="COMPANY" width="170" header="Company">
    <cfgridcolumn name="FIRSTNAME"  header="Contact Name">
    <cfgridcolumn name="POS" width="160" header="Position">
    <cfgridcolumn name="DEPARTMENTNOM" width="150" header="Department">
    <cfgridcolumn name="SECTORSNOM" width="120" header="Sectors">
    <cfgridcolumn name="ABUNDANCE" width="120" header="Action date">
    <cfgridcolumn name="SECTORS1" width="120" header="Action date" display="no">
    <cfgridcolumn name="PRICE" width="120" header="Action date" display="no">
    <cfgridcolumn name="PHONE" width="120" header="Action date" display="no">
    <cfgridcolumn name="EMAIL" width="120" header="Action date" display="no">
    <cfgridcolumn name="MOBILE" width="120" header="Action date" display="no">
    <cfgridcolumn name="ADDRESS" width="120" header="Action date" display="no">
    <cfgridcolumn name="CITY" width="120" header="Action date" display="no">
    <cfgridcolumn name="COMMENTS" width="120" header="Action date" display="no">
    <cfgridcolumn name="MTGT" width="120" header="Action date" display="no">
       </cfgrid>
    <!---FIRST--->
    <table width="880" class="stat" >
    <tr><td><cfoutput>#QNAMES.RecordCount# Companies</cfoutput></td></tr>
    <tr>
    <td>Company:<cfinput class="input" type="text" name="COMPANY" size="20" label="Company" required="yes"  bind="{UsersGrid.COMPANY}" ></td>
    <td>
    Sector:<cfselect class="input" name="SECTORS1" size="1" label="Sector" required="yes">
    <option></option><cfoutput query="industries"><option value="#SECTORSIDS#">#SECTORSNOM#</option></cfoutput></cfselect>
    </td>
    <td>Ranking:<cfinput class="input"  type="TEXT" name="RANKING" size="3" label="Ranking" bind="{UsersGrid.RANKING}" ></td>
    <td>Price:<cfinput class="input" type="TEXT" name="PRICE" size="3" label="Price" bind="{UsersGrid.PRICE}" >
    <a href="" id="myLink" target="_blank">Google</a>
    <a href="" id="Linkedin" target="_blank">Linkedin</a></td>
    </tr>
    <tr>
    <td>Department:<cfselect class="input" name="DEPARTMENT1" size="1" label="Department" required="yes">
    <option></option><cfoutput query="dNames"><option value="#DEPARTMENTIDS#">#DEPARTMENTNOM#</option></cfoutput></cfselect>
    </td>
    <td>Name:<cfinput class="input" type="text" name="FIRSTNAME" label="Name" required="yes" width="150" bind="{UsersGrid.FIRSTNAME}" ></td>
    <td>Position:<cfinput class="input" type="text" name="POS" label="Position" width="150" bind="{UsersGrid.POS}" ></td>
    <td>Phone:<cfinput class="input" type="text" name="PHONE" label="Phone" width="150" bind="{UsersGrid.PHONE}" ></td>
    </tr>
    <!--- THIRD--->
    <tr><td>Email:<cfinput class="input" type="text" name="EMAIL" label="Email" width="150" bind="{UsersGrid.EMAIL}" ></td>
    <td>Mobile:<cfinput class="input" type="text" name="MOBILE" label="Mobile"  bind="{UsersGrid.MOBILE}" ></td>
    <td>Address:<cfinput class="input" type="text" name="ADDRESS" label="Address"  bind="{UsersGrid.ADDRESS}" ></td>
    <td><cfselect class="input" name="CITY" width="80" size="1" >
    <cfoutput query="xity"><option value="#CITYID#">#CITYNOM#</option></cfoutput>
    </cfselect></td>
    </tr> 
    <!--- FOURTH --->
    <tr><td>Comments:<cftextarea class="input" name="COMMENTS" height="60"  label="Comments" bind="{UsersGrid.COMMENTS}" /> </td>
    <td>Action:<cfinput type="DateField" class="input" size="10" name="ABUNDANCE" label="Action"  bind="{UsersGrid.ABUNDANCE}" ></td>
    <td>Time:<cfselect class="input" name="MTGT" width="90" label="Time"><option>7:00AM</option></cfselect></td>
    <td><cfselect class="input" name="STATE1"  size="1" label="Action" >
    <cfoutput query="salesstep"><option value="#SALESID#">#SALESNOM#</option></cfoutput>
    </cfselect>  </td>
    <cfinput type="hidden" name="ENTID" label="ENTID" bind="{UsersGrid.ENTID}" >
    </tr>
    <tr> <td> 
    <cfinput type="submit" name="DELCOM" value="delete" class="button" >
    <cfinput type="submit" name="UPDATEADDBTN" value="UPDATE or ADD NEW" class="button"></td>
    </tr>
    </table>
    </cfform>
    <cfif isDefined("FORM.DELCOM")>
    <CFQUERY name="deletecompany" datasource="tester">
    DELETE FROM COMPANY
    WHERE ENTID = #FORM.ENTID#
    </CFQUERY>
    <CFLOCATION URL="testht.cfm">
    </cfif>
    </div>
    </body>
    </html>

  • Cfselect data binding with statically defined options

    I am having some trouble getting statically defined options
    to remain in my cfselects when I use binding in CF8
    I have four cfselects: Continent, Country, State/Province,
    County
    The continent select is populated by a list in a database,
    and each subsequent select is populated depending on the continent
    value (your run-of-the-mill related select box model).
    I have a form that allows a user to edit an existing record
    that uses these select boxes. The form is populated with data from
    that existing record - for example, a record in which
    Continent=North America, Country=United States, State=Montana, and
    County=Meagher
    The problem is that when I define a static option based on
    what's already in the database:
    <cfselect name="continentSelect"
    bind="cfc:CF_Classes.places.getContinents()" bindonload="true">
    <option value="#
    defined continent name#" selected="selected">
    defined continent name</option>
    </cfselect>
    the static option is displayed only momentarily while the
    query is running and then disappears completely from the box once
    the box is populated. I have got the option to stay when I turn
    "bindonload" off, but even then when I trigger the binding the
    option disappears. I have been able to get it to stay when I use
    the old method of defining a query to populate the box, but then I
    lose the binding ability in subsequent boxes so that options I
    don't want to show are displayed (i.e. something like
    Continent=North America, Country=Japan).
    Maybe there isn't a way around this, but there is an example
    of this type of thing in the CFML reference for CF8. I haven't
    tested it so I don't know if that one works or not. Am I missing
    something?

    Hi,
    There are a couple of ways you can do this. One is where the dropdown would change the presence of static text objects. The other would be where the dropdown would set the actual text within a textfield.
    Sample here: https://acrobat.com/#d=k2tAeWMsKS0pEbhmWt33oA
    Good luck,
    Niall

  • Cfloop within select causes Dreamweaver to crash

    Placing a cfloop tag within a select (or cfselect) tag causes
    Dreamweaver to crash when the mouse is clicked anywhere within the
    code window. Code as below:
    (Code attached)
    The cfloop was going to be used to produce additional option
    elements. The option element values were to be taken from the list.
    Dreamweaver won't even let you edit the statement out or
    comment it because it crashes as soon as you click to place the
    curser within the code window.

    WaltBulawa wrote:
    > As it turns out, when I replaced the <Form> with
    <cfForm> and the <select> with <cfselect> the
    problem was resolved.
    You haven't really resolved the problem, but delayed it for
    another day.
    To avoid the risk of future crashes, I recommend that you
    delete
    WinFileCache-********.dat after closing Dreamweaver down for
    the day. A
    clean version of the file will be generated automatically
    when you next
    use DW.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Creating form element from within a component

    Hi all,
    I am trying to create a form element within a component
    function which is then called from a .cfm page which has the cfform
    tags. I keep getting a context validation error for the form
    element tag. Here is some sample code:
    <cfcomponent name="yourComponent">
    <cffunction name="createTag" returntype="string"
    access="public">
    <cfsavecontent variable="returnContent">
    <cfselect name="thisSelect">
    <option value="0">Value 1</option>
    </cfselect>
    </cfsaveconten>
    <cfreturn returnContent>
    </cffunction>
    </cfcomponent>
    And in the .cfm page:
    <cfform>
    <cfinvoke component="yourComponent" method="createTag"
    returnVariable="returnContent"/>
    <cfoutput>#returnContent#</cfoutput>
    </cfform>
    The error occurs in the function and it says the cfselect
    must be within a cfform. I tried the function without the save
    content and just set the output="yes" but the same error occurs.
    Any help appreciated in how to get around this. Just putting
    the code in the .cfm is not an option for this.
    Any help appreciated.
    Jim

    quote:
    Originally posted by:
    jim1234
    Thanks for the reply. Yes, that works. So it looks like it
    has to do with the function call.
    After some further investigation, I found out that a regular
    <select> works, it's just the <cfselect> that does not.
    ColdFusion wants it directly within the <cfform> tag.
    Something does not make sense. If the cfsavecontent worked in
    the cfm file, there is no reason for it not to work in a cfc.
    If you want to persue this, the next troubleshooting step is
    to copy the function to your cfm file and see if it works. I
    suspect that you are trying something simple as a proof of concept.

  • Multiple CFFORMs in a page w/ binding CFSELECTS

    Howdy all.
    I have a page that has two CFFORMs, each uniquely named (form1 & form2 for example).
    Each form is essentially the same - each one has a cfselect with States pulled from a common query and also has a bound cfselect that shows the Area Codes for that chosen state. Both cfselect elements are called "State" and "AreaCode" respectively. I do not wish to change the name of the cfselect elements.
    {cfform name="form1"}
         {cfselect name="State" bind="cfc:path.to.cfc.getStates()" bindonload="yes" }
         {cfselect name="AreaCode" bind="cfc:path.to.cfc.getAreaCodes(state={form1:State})" bindonload="yes" }
    { /cfform }
    {cfform name="form2"}
         {cfselect name="State" bind="cfc:path.to.cfc.getStates()" bindonload="yes" }
         {cfselect name="AreaCode" bind="cfc:path.to.cfc.getAreaCodes(state={form2:State})" bindonload="yes" }
    { /cfform }
    The problem is, if I switch the state select in form2, *form1*'s AreaCode gets the bound response instead of form2.
    Is there a way to expressly tell CF to "stay within its own form" for the binding?
    Thanks in advance,
    Andrew

    I spoke too soon. It works for the latest FireFox, but not with IE8.
    I've modified the form slightly to:
    {cfform name="form1"}
         {cfselect id="State" name="State" bind="cfc:path.to.cfc.getStates()" bindonload="yes" }
         {cfselect id="AreaCode" name="AreaCode" bind="cfc:path.to.cfc.getAreaCodes(state={form1:State})" bindonload="yes" }
    { /cfform }
    {cfform name="form2"}
         {cfselect id="State2" name="State" bind="cfc:path.to.cfc.getStates()" bindonload="yes" }
         {cfselect id="AreaCode2" name="AreaCode" bind="cfc:path.to.cfc.getAreaCodes(state={form2:State2})" bindonload="yes" }
    { /cfform }
    I fired up the AJAX Logger on IE8 to try to see what's going on.
    If I switch the state on form1, the AreaCode field in form1 is NOT populated correctly, and the logger seems to indicate that it's pushing the values to the second form.
    If I switch the state on form2, AreaCode2 IS populated correctly.
    Darn you, Internet Explorer!
    Any further suggestions would be most welcome. Thanks in advance.
    -Andrew

  • Outputting one cfselect fine now two

    Hi all,
    I am using coldfusion cfform in flash format -maybe this is
    the place to come for an actionscript question. The cfgrid tag
    works fine for one field the "state" field output with cfselect
    with the following onchange actionscript:
    <cfform format="Flash" skin="haloblue">
    <cfgrid name="UsersGrid" format="Flash"
    query="qNames" rowheaders="No"
    onchange="for (var i:Number = 0; i<state.length; i++) {if
    (state.getItemAt(
    ).data == UsersGrid.selectedItem.state) state.selectedIndex =
    i}">
    What I want to get is
    onchange="for (var i:Number = 0; i<state.length; i++) {if
    (state.getItemAt().data == UsersGrid.selectedItem.state)
    state.selectedIndex = i}"
    AND
    onchange="for (var i:Number = 0; i<meetingtime.length;
    i++) {if (meetingtime.getItemAt(
    ).data == UsersGrid.selectedItem.meetingtime)
    meetingtime.selectedIndex = i}">
    so I can connect to my meetingtime field and db field. I just
    don´t know how , thank you for any help.
    <cfgridcolumn name="FIRSTNAME" header="Contact Name">
    <cfgridcolumn name="ENTID" display="FALSE">
    <cfgridcolumn name="state" header="Next Step">
    </cfgrid>
    <cfformgroup type="tabnavigator">
    <cfformgroup type="page" label="Details:
    #dateFormat(now(), 'mmm dd, yyyy')#">
    <cfformgroup type="horizontal">
    <cfinput type="text" name="FIRSTNAME" label="First Name"
    bind="{UsersGrid.dataProvider[UsersGrid.selectedIndex]['FIRSTNAME']}"
    onChange="UsersGrid.dataProvider.editField(UsersGrid.selectedIndex,
    'FIRSTNAME', FIRSTNAME.text);">
    <cfselect name="state" width="200" size="1" label="Next
    Step"
    onchange="UsersGrid.dataProvider.editField(UsersGrid.selectedIndex,
    'state', state.selectedItem.data);">
    <option value="nulo">None</OPTION>
    <option value="SEND STUDY">SEND STUDY</OPTION>
    <option value="SEND PROPOSAL">SEND
    PROPOSAL</OPTION>
    <option value="CALL AND EMAIL">CALL AND
    EMAIL</OPTION>
    <option value="CALL">CALL</OPTION>
    <option value="SEND PRESENTATION">SEND
    PRESENTATION</OPTION>
    <option value="MEETING">MEETING</OPTION>
    </cfselect>
    <cfinput type="hidden" name="ENTID" label="ENTID"
    bind="{UsersGrid.dataProvider[UsersGrid.selectedIndex]['ENTID']}"
    onChange="UsersGrid.dataProvider.editField(UsersGrid.selectedIndex,
    'ENTID', ENTID.text);">
    </cfformgroup>
    </cfform>

    A similar thing happened to me. My MacBook went in two weeks ago because the built-in iSight was failing intermittently. It spent some time at the repair depot waiting for a main logic board.
    I got the call this morning that it was back at the local Apple Store.
    The clerk brought it out from the storeroom, I pressed the power button, and was treated to a weird display of multi-colored vertical lines.
    Now, the MacBook is on its way back to the repair depot to see what's wrong now.
    The only small consolation is that I've learned Apple's term for such not-quite-repaired machines. I'm the proud owner of a "looper."
    MacBook 2.0GHz SuperDrive "the looper"   Mac OS X (10.4.7)   My MacBook's getting more vacation this summer than I am!

  • Select in cfselect from cfgrid

    Form is flash CF 7.01
    Is there a way to have a cfselect "selected" option chosen by
    a cfgrid
    selection either by binding or flash remote?
    Here is my form. Thanks for any help you can give...
    The binding on the second cfselect does not work.
    <cfform action="maina.cfm" method="post" name="usermaint"
    preservedata="true" preloader="yes" format="flash"
    height="500" width="400"
    skin="haloblue">
    <cfformgroup type="tabnavigator" visible="yes"
    enabled="yes"
    name="mytab" id="mytab" onchange="#getdata#"
    style="backgroundAlpha: 0;"
    wmode="transparent">
    <cfformgroup type="page" label="New User"
    selectedindex="1"
    visible="yes" enabled="yes">
    <cfinput type="text" name="uName" message="A user name is
    required"
    label="User Name" required="yes">
    <cfinput type="password" name="password" message="A
    password is
    required" label="Password" required="yes">
    <cfinput type="password" name="password1" message="A
    confirming
    password is required" label="Confirming password"
    required="yes">
    <cfselect name="SecLevel" size="1" label="Security"
    query="secl"
    value="level" display="level" selected="User"
    width="75"></cfselect>
    <cfinput type="button" name="Submit" value="Submit"
    onclick="#adduser#">
    </cfformgroup>
    <cfformgroup type="page" label="Edit User"
    selectedindex="1"
    visible="yes" enabled="yes">
    <cfgrid name="userslist" height="165" width="250"
    query="listusers"
    selectmode="edit" format="flash" autowidth="true">
    <cfgridcolumn name="uName" header="User Name"
    headeralign="left"
    dataalign="left" width="86" bold="no" italic="no" select="no"
    display="yes"
    headerbold="no" headeritalic="no" />
    <cfgridcolumn name="SecLevel" header="Admin"
    headeralign="left"
    dataalign="left" width="46" bold="no" italic="no" select="no"
    display="yes"
    headerbold="no" headeritalic="no" />
    </cfgrid>
    <cfinput type="text" name="uNameA" message="A user name
    is required"
    bind="{userslist.selectedItem.uName}" label="User Name"
    required="yes">
    <cfinput type="password" name="passwordA" message="A
    password is
    required" bind="{userslist.selectedItem.password}"
    label="Password"
    required="yes">
    <cfinput type="password" name="password1A" message="A
    confirming
    password is required"
    bind="{userslist.selectedItem.password}"
    label="Confirming password" required="yes">
    <cfselect name="SecLevelA" size="1" label="Security"
    query="secl"
    value="level" display="level"
    selected="{userslist.selectedItem.SecLevel}"
    width="75"></cfselect> <cfinput type="button"
    name="SubmitA"
    value="Update" onclick="#edituser#">
    </cfformgroup>
    </cfformgroup>
    </cfform>

    Never mind figured it out using remoting.
    myService.getselect(gridname.selectedItem.fieldname);
    "Rick" <[email protected]> wrote in message
    news:[email protected]...
    > Form is flash CF 7.01
    >
    > Is there a way to have a cfselect "selected" option
    chosen by a cfgrid
    > selection either by binding or flash remote?
    >
    > Here is my form. Thanks for any help you can give...
    >
    > The binding on the second cfselect does not work.
    >
    > <cfform action="maina.cfm" method="post"
    name="usermaint"
    > preservedata="true" preloader="yes" format="flash"
    height="500"
    > width="400" skin="haloblue">
    > <cfformgroup type="tabnavigator" visible="yes"
    enabled="yes"
    > name="mytab" id="mytab" onchange="#getdata#"
    style="backgroundAlpha: 0;"
    > wmode="transparent">
    > <cfformgroup type="page" label="New User"
    selectedindex="1"
    > visible="yes" enabled="yes">
    >
    > <cfinput type="text" name="uName" message="A user
    name is required"
    > label="User Name" required="yes">
    > <cfinput type="password" name="password" message="A
    password is
    > required" label="Password" required="yes">
    > <cfinput type="password" name="password1" message="A
    confirming
    > password is required" label="Confirming password"
    required="yes">
    > <cfselect name="SecLevel" size="1" label="Security"
    query="secl"
    > value="level" display="level" selected="User"
    width="75"></cfselect>
    > <cfinput type="button" name="Submit" value="Submit"
    > onclick="#adduser#">
    > </cfformgroup>
    > <cfformgroup type="page" label="Edit User"
    selectedindex="1"
    > visible="yes" enabled="yes">
    > <cfgrid name="userslist" height="165" width="250"
    query="listusers"
    > selectmode="edit" format="flash" autowidth="true">
    > <cfgridcolumn name="uName" header="User Name"
    headeralign="left"
    > dataalign="left" width="86" bold="no" italic="no"
    select="no"
    > display="yes" headerbold="no" headeritalic="no" />
    > <cfgridcolumn name="SecLevel" header="Admin"
    headeralign="left"
    > dataalign="left" width="46" bold="no" italic="no"
    select="no"
    > display="yes" headerbold="no" headeritalic="no" />
    > </cfgrid>
    > <cfinput type="text" name="uNameA" message="A user
    name is
    > required" bind="{userslist.selectedItem.uName}"
    label="User Name"
    > required="yes">
    > <cfinput type="password" name="passwordA" message="A
    password is
    > required" bind="{userslist.selectedItem.password}"
    label="Password"
    > required="yes">
    > <cfinput type="password" name="password1A" message="A
    confirming
    > password is required"
    bind="{userslist.selectedItem.password}"
    > label="Confirming password" required="yes">
    > <cfselect name="SecLevelA" size="1" label="Security"
    query="secl"
    > value="level" display="level"
    selected="{userslist.selectedItem.SecLevel}"
    > width="75"></cfselect> <cfinput
    type="button" name="SubmitA"
    > value="Update" onclick="#edituser#">
    > </cfformgroup>
    > </cfformgroup>
    > </cfform>
    >

  • CF11 - CFGRID & CFSELECT binding issue

    We just upgraded to CF11 and one of our apps had pieces stop functioning. We have figured out most of it, however one of our cfgrids is having issues. When the page is loaded the cfgrid hits the CFC that is specified in the bind settings (passes in the default employee ID of 0 and returns no data). When we select an employee name from the dropdown menu, we receive a 400 error saying the page can't be found. When the select is changed, it looks like it reverts to the root path instead of the cfc specific in the bind argument. Does anyone have any idea on the direction we should go to fix this? The exact same code works on CF8... but is completely broken on CF11.
    Thanks for your help.

    BKBK Sorry for the confusion... we set an array for the arguments, below is the full block of code.
    <cfform id="evaluation" name="evaluation">
    <div style="height:30px; margin-top:10px;">
    <div style=" margin-right:10px; float:left;">
    <cfselect name="employee" query="EmployeeList" value="affiliateID" display="empName" queryPosition="below">
    <option value="0" selected="selected">--- Select an employee ---</option>
    </cfselect>
    </div>
    </div>
        <cfset args = structNew()>
    <cfset args.name = "ExistingEvals">
    <cfset args.format = "html">
    <cfset args.bindOnLoad = "true">
    <cfset args.bind = "cfc:empEval.getCompletedEvals({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridso rtdirection},{employee})">
    <cfset args.stripeRows = true>
    <cfset args.selectColor = "##D9E8FB">
    <cfset args.selectmode = "row">
    <cfset args.selectOnLoad = "false">
    <cfset args.autowidth = "no">
    <cfset args.width = "335px">
        <cfset args.pageSize = "6">
    <cfset args.height = "200px">
    <div style=" margin-top:5px;">
    <cfgrid name="employeeEvals" attributeCollection="#args#">
    <cfgridcolumn name="empAffiliateID" display="no">
    <cfgridcolumn name="FY" display="no">
    <cfgridcolumn name="evaluationID" display="no">
    <cfgridcolumn name="typeID" header="Eval Type" display="yes" width="75">
    <cfgridcolumn name="FY" header="Fiscal Year" display="yes" width="90">
    <cfgridcolumn name="Status" header="Status" display="yes" width="125">
    <!---<cfgridcolumn name="Date" header="Date" display="yes">--->
    </cfgrid>

  • CFGRID/CFSELECT/ActionScript problem

    I have CFGRID "onchange" code below that allows me to click
    on a CFGRID row and correctly display (in a separate CFFORMGROUP)
    the correct column value in via a CFSELECT object. The field name
    is
    priority and the grid name is
    tasks_grid.
    Works fine, but my problem is that I've been unable to get
    this to work on non-integer fields. If the field contains a text
    string, no matter how small, the ActionScript "if" statements don't
    seem to produce results. Could it be incorrect use of the ==
    operator? I'm not an AS programmer, so I'm unfortunately on the low
    end of the learning curve here.
    I hope the above makes sense. Any thoughts would be greatly
    appreciated.

    So far the best solution seems to be to create an array for
    each such field that creates a new query column containing the text
    data. I then reference the new "text" column ("priorityText", in
    this instance) via CFGRIDCOLUMN and use the original "integer"
    column (i.e., the actual field data) for the ActionScript matching
    code in the child form. The array code is from another post, in the
    Rich Forms forum, I believe.

  • cfselect not working with flash form

    I have searched the forum and google to find a solution -
    I've tried what's been suggested (ie - mappings of /CFIDE, adding
    /CFIDE to the site root, etc.) nothing has worked. This is only
    happening in my production boxes (two identical setups, running in
    parallel) -
    The form loads, but any options I define inside
    <cfselect> will not show.. here's the basic code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    <cfform name="theForm" format="Flash" width="300"
    height="200" accessible="yes">
    <cfselect label="Type: " name="feedbackType" width="200"
    enabled="yes" required="yes">
    <option value="">Select</option>
    <option value="WEB">Our Website</option>
    <option value="ACCOUNT">Your Account</option>
    <option value="COMPLAINT">A Complaint</option>
    <option value="GENERAL">General Comment</option>
    <option value="OTHER">Other</option>
    </cfselect>
    </cfform>
    </body>
    </html>
    Same code works on my localhost (development box) - so I'm
    sure it's some setting I'm missing or messed up in the production
    servers. I have checked the IIS settings as well as the mappings in
    CF admin, both have /CFIDE defined. I've even added a mapping to
    the /CFIDE within the site root.
    I'm currently running CFMX 7.0.2 on Server 2003 with IIS 6
    Please help!!

    More info...
    When I call the page locally...
    http://flush/testFlash.cfm
    the form works perfectly.
    but when I call the page using the domain...
    http://www.mydomain.com/testFlash.cfm
    the <cfselect> will not work.

Maybe you are looking for

  • IT0009: payment method "cheque" and dynamic actions

    Hello, I need your help on this issue. I have looking for answers on the different posts but i didn't found any similar problems. For a customer, i have to settle, in case of departure (leaving) action , the creation in background of an infotype 0009

  • Field TVRRUR SAKUR is not defined in incompletion procedure RR

    Hello Experts, After upgrade 4.6 > ECC 6.00 existing contracts are incomplete status and it does not allow invoice them. Information V1105 appears. I tried to fix problem with note 1265438. After that info chaged to "No screens are assigned to field

  • How to create a runtime repos in 10gR2

    Can anyone guide me through creating a runtime repository, access user and target schema(s)? We have a DESIGN REPOS, but would also like a repos on the target database for deploying to. I believe that there is no longer a RUNTIME ASSISTANT from relea

  • Need to remove timecode counter from video

    I have some clips in FCPx that were converted from an old VHS tape with the white timecode counter accidentally displayed.  I no longer have access to the original VHS tape so cannot reimport it without the timecode showing. Does Final Cut Pro X have

  • How to create the multi-realm (or multi-entries)in one Directory instance?

    how to create the multi-realm (or multi-entries)in one Directory instance? I have installed a new iplanet Directory Server 5.2 on a win2k box, named "vp.com1.com" When I installed this server, it helped me to create a new Directory server instance wi