Advertisement

12.21.2005 at 02:31PM PST, ID: 21672537
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

ColdFusion Select Box (Dropdown Box) Value -- Won't select the right value.

Asked by tmangoldcpa in ColdFusion Application Server, ColdFusion Studio

Tags: , ,

I have a table displaying several records.  I’m trying to display one of the fields, “TemplateID”, in a select box, but I’m unable to force the correct value into the select box for each record.  The first select box displays the correct value (i.e. the value of TemplateID in the first record), however, all subsequent records display the same value as the first record.

The select boxes are dynamically named to avoid naming conflicts.  I *am* able to force different values into each select box if I equate the TemplateID value to #ServiceItem.CurrentRow#, but of course, that’s just diagnostic, not exactly helpful.  I’ve ensured that each value of TemplateID does in fact exist in the select box’s option list.

I’ve been battling this problem for several days – a solution will be VERY APPRECIATED!

CFML and HTML Source is below.

Thanks in advance to the genius who solves this headache!

------------------

CFML Source:

<cfquery name="Templates" datasource="tmgcpa">
SELECT TemplateID, TemplateName
FROM dms_DocketTemplates
ORDER BY TemplateName
</cfquery>

<cfquery name="ServiceItems" datasource="tmgcpa">
SELECT *
FROM dms_qryClientServices
WHERE ClientID = '#URL.ClientID#'
</cfquery>

<form name="form1" method="post" action="">
<table width="740" border="1" cellspacing="0" bordercolor="#CCCCCC" class="SmallText">
<tr>
            <td width="14"><input name="ClientID" type="hidden" id="ClientID" value="<cfoutput>#ServiceItems.ClientID#</cfoutput>"></td>
            <td width="160"><strong>Service Item</strong></td>
            <td width="120"><strong>Frequency</strong></td>
            <td width="300"><strong>Template Triggered</strong></td>
            <td width="60"><strong>Anchor Date</strong></td>
            <td width="80"><strong>Lead Time</strong></td>
            <td width="80">Active</td>
          </tr>
          <cfoutput>
            <cfloop query="ServiceItems">
              <tr>
                <td><strong>#ServiceItems.CurrentRow#.
                  <input name="ClientServiceID" type="hidden" id="ClientServiceID" value="#ServiceItems.ClientServiceID#">
                  </strong></td>
                <td>#ServiceItems.ServiceItem#</td>
                <td>#ServiceItems.IntervalName2#</td>
                <td>
               
<!--- *********** --->
<select name="Template#ServiceItems.ClientServiceID#" class="SmallText" id="Template" title="#ServiceItems.TemplateID#">
                    <cfloop query="Templates">
                      <option value="#Templates.TemplateID#" <cfif #Templates.TemplateID# EQ #ServiceItems.TemplateID#>selected</cfif>>#Templates.TemplateName#
                      (#Templates.TemplateID#)</option>
                    </cfloop>
                  </select>
<!--- *********** --->
      
                </td>
                <td><input name="AnchorDate#ServiceItems.ClientServiceID#" type="text" class="SmallText" id="AnchorDate" value="#DateFormat(ServiceItems.AnchorDate, "short")#" size="10"></td>
                <td><input name="LeadTime#ServiceItems.ClientServiceID#" type="text" class="SmallText" id="LeadTime" value="#ServiceItems.LeadTime#" size="4"></td>
                <td>
<input <cfif (#ServiceItems.Active# EQ 1)>checked</cfif> type="checkbox" name="Active#ServiceItems.ClientServiceID#" value="1"></td>
              </tr>
            </cfloop>
          </cfoutput>
        </table>
      </form> </td>


HTML Source:

<html><!-- InstanceBegin template="/Templates/MainTemplate.dwt.cfm" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Mangold CPAs</title>
<!-- InstanceEndEditable -->

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" -->

<!-- InstanceEndEditable -->
<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body topmargin="2" rightmargin="0" bottommargin="0" leftmargin="0">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr bgcolor="#FFFFFF">
    <td colspan="2" rowspan="2" valign="middle"><a href="mainMenu.cfm"><img src="graphics/tmgcpa_banner.gif" width="450" height="50" border="0"></a></td>
    <td width="100%" rowspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
    <td width="296" height="24" valign="top" class="MediumText"><div align="right">
      
          User: WDN
         
      &nbsp;
      </div></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="26" valign="bottom"> <div align="right" class="MediumText">December 21, 2005 &nbsp;</div></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="30" height="655" valign="top" class="SmallText"><!--DWLayoutEmptyCell-->&nbsp;</td>
    <!-- InstanceBeginEditable name="MainContent" -->
    <td colspan="3" valign="top" bgcolor="#FFFFFF"><span class="menuText">MAIN
      MENU &gt; CLIENT &gt; ADD MULTIPLE SERVICE ITEMS</span><br>
      <br>
      <span class="Title">Edit Client Service Items: {Handle}</span><br>
      <br>
      <span class="SmallText"><strong><a href="addMultipleServiceItems.cfm">Add/Remove
      Service Items</a></strong></span><br>
      <form name="form1" method="post" action="">
        <table width="740" border="1" cellspacing="0" bordercolor="#CCCCCC" class="SmallText">
          <tr>
            <td width="14"><input name="ClientID" type="hidden" id="ClientID" value="1616871"></td>
            <td width="160"><strong>Service Item</strong></td>
            <td width="120"><strong>Frequency</strong></td>
            <td width="300"><strong>Template Triggered</strong></td>
            <td width="60"><strong>Anchor Date</strong></td>
            <td width="80"><strong>Lead Time</strong></td>
            <td width="80">Active</td>
          </tr>
           
           
              <tr>
                <td><strong>1.
                  <input name="ClientServiceID" type="hidden" id="ClientServiceID" value="51">
                  <input name="TemplateNo" type="hidden" id="TemplateNo" value="44">
                  </strong></td>
                <td>Financial Statements</td>
                <td>Monthly</td>
                <td>
                  <select name="Template51" class="SmallText" id="Template" title="44">
                   
                      <option value="13" >Tax Return - Individual - Level 4
                      (13)</option>
                   
                      <option value="14" >Tax Return - Individual - Level 5
                      (14)</option>
                   
                      <option value="46" >TemplateTest2
                      (46)</option>
                   
                      <option value="47" >TemplateTest2
                      (47)</option>
                   
                      <option value="48" >TemplateTest3
                      (48)</option>
                   
                      <option value="49" >TemplateTest4
                      (49)</option>
                   
                      <option value="50" >Test5
                      (50)</option>
                   
                      <option value="44" selected>TestTemplate1
                      (44)</option>
                   
                      <option value="45" >TestTemplate2
                      (45)</option>
                   
                  </select>
                </td>
                <td><input name="AnchorDate51" type="text" class="SmallText" id="AnchorDate" value="1/1/04" size="10"></td>
                <td><input name="LeadTime51" type="text" class="SmallText" id="LeadTime" value="1" size="4"></td>
                <td>
<input checked type="checkbox" name="Active51" value="1"></td>
              </tr>
           
              <tr>
                <td><strong>2.
                  <input name="ClientServiceID" type="hidden" id="ClientServiceID" value="52">
                  <input name="TemplateNo" type="hidden" id="TemplateNo" value="44">
                  </strong></td>
                <td>Service Item #2</td>
                <td>Daily</td>
                <td>
                  <select name="Template52" class="SmallText" id="Template" title="44">
                                       
                      <option value="13" >Tax Return - Individual - Level 4
                      (13)</option>
                   
                      <option value="14" >Tax Return - Individual - Level 5
                      (14)</option>
                   
                      <option value="46" >TemplateTest2
                      (46)</option>
                   
                      <option value="47" >TemplateTest2
                      (47)</option>
                   
                      <option value="48" >TemplateTest3
                      (48)</option>
                   
                      <option value="49" >TemplateTest4
                      (49)</option>
                   
                      <option value="50" >Test5
                      (50)</option>
                   
                      <option value="44" selected>TestTemplate1
                      (44)</option>
                   
                      <option value="45" >TestTemplate2
                      (45)</option>
                   
                  </select>
                </td>
                <td><input name="AnchorDate52" type="text" class="SmallText" id="AnchorDate" value="2/2/02" size="10"></td>
                <td><input name="LeadTime52" type="text" class="SmallText" id="LeadTime" value="0" size="4"></td>
                <td>
<input checked type="checkbox" name="Active52" value="1"></td>
              </tr>
           
              <tr>
                <td><strong>3.
                  <input name="ClientServiceID" type="hidden" id="ClientServiceID" value="54">
                  <input name="TemplateNo" type="hidden" id="TemplateNo" value="44">
                  </strong></td>
                <td>Service Item #5</td>
                <td>Daily</td>
                <td>
                  <select name="Template54" class="SmallText" id="Template" title="44">
                   
                      <option value="13" >Tax Return - Individual - Level 4
                      (13)</option>
                   
                      <option value="14" >Tax Return - Individual - Level 5
                      (14)</option>
                   
                      <option value="46" >TemplateTest2
                      (46)</option>
                   
                      <option value="47" >TemplateTest2
                      (47)</option>
                   
                      <option value="48" >TemplateTest3
                      (48)</option>
                   
                      <option value="49" >TemplateTest4
                      (49)</option>
                   
                      <option value="50" >Test5
                      (50)</option>
                   
                      <option value="44" selected>TestTemplate1
                      (44)</option>
                   
                      <option value="45" >TestTemplate2
                      (45)</option>
                   
                  </select>
                </td>
                <td><input name="AnchorDate54" type="text" class="SmallText" id="AnchorDate" value="3/3/03" size="10"></td>
                <td><input name="LeadTime54" type="text" class="SmallText" id="LeadTime" value="0" size="4"></td>
                <td>
<input checked type="checkbox" name="Active54" value="1"></td>
              </tr>
              <tr>
            <td colspan="2"> <input type="submit" name="Submit" value="Update Service Items">
              <input name="UpdateServiceItems" type="hidden" id="UpdateServiceItems" value="UpdateServiceItems"></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </form> </td>
    <!-- InstanceEndEditable --></tr>
  <tr>
    <td height="18" colspan="4" valign="top" class="SmallText"><div align="center"><font color="#999999">&copy;
        2005 </font></div></td>
  </tr>
  <tr>
    <td height="19">&nbsp;</td>
    <td width="420"></td>
    <td></td>
    <td></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>
Start Free Trial
 
Loading Advertisement...
 
[+][-]12.21.2005 at 03:06PM PST, ID: 15530697

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, ColdFusion Studio
Tags: coldfusion, select, box
Sign Up Now!
Solution Provided By: wulfshayde
Participating Experts: 4
Solution Grade: A
 
 
[+][-]12.21.2005 at 03:07PM PST, ID: 15530702

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.23.2005 at 11:13AM PST, ID: 15544038

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.27.2005 at 02:39PM PST, ID: 15558867

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.28.2005 at 01:14AM PST, ID: 15561345

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.11.2006 at 08:51AM PST, ID: 15672441

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.11.2006 at 02:36PM PST, ID: 15676415

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44