#specno#

Update #projspecid#


#projspecid#

#spectitle#

Delete Spec

#paragraphformat(specification)#

SKU:#sku# #itemname# (#productid#)
Location: #location#     Spec Date: #dateformat(specdate,"mm-dd-yy")#   

#dollarformat(allowance)#

Revised Date: #dateformat(reviseddate,"mm-dd-yy")#  

-------------------------------------------------- Here is Action Form Query = SELECT project_specs.projspecid, project_specs.projectid, project_specs.dontshow From project_specs Where project_specs_projectid=#projectid# Here is Loop code Update project_specs (projspecid,dontshow) VALUES('#updatespecs.projspecid#','#updatespecs.dontshow#' )> ----------------------------------------Here is Error---------------------- Error resolving parameter PROJECTID ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either: 1. You have misspelled the parameter name, or 2. You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag. The error occurred while evaluating the expression: #projectid# The error occurred while processing an element with a general identifier of (#projectid#), occupying document position (18:26) to (18:36). [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => terryt [ip] => terry@biz1usa.c [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> Check boxes -Update many Items - Coldfusion - Getting Started

Professional Web Applications Themes

Check boxes -Update many Items - Coldfusion - Getting Started

I have a list of Construction Specs and want to have one form with check box that when = Yes or 1 = dontshow item The form has a check box with each item The action update form does not update the database I get an error: Here is Entry Form: <cfoutput query="getspecs" group="projcategoryid" > <FORM ACTION="project_specsshowupdateinsert.cfm?projecid =#projectid#" METHOD="POST"> <table width="90%" bgcolor="CCCC99"> <tr> <td width="25%"><font face="arial" size=+1 color="004080">Project ID</font> <td width="75%"><font face="arial" size=+1 color="004080">#projectid#</font><br> <input type="hidden" value="#projectid#" maxrows=1> </td> </tr> </table> <table WIDTH="90%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="50%" bgcolor="COCOCO"><font face="Arial" color="004080"><strong>#Section# - #Category#</strong></font> <a name="#category#"> </td> <td width="25%" bgcolor="COCOCO" ...

  1. #1

    Default Check boxes -Update many Items

    I have a list of Construction Specs and want to have one form with check box
    that when = Yes or 1 = dontshow item

    The form has a check box with each item

    The action update form does not update the database I get an error:



    Here is Entry Form:
    <cfoutput query="getspecs" group="projcategoryid" >

    <FORM ACTION="project_specsshowupdateinsert.cfm?projecid =#projectid#"
    METHOD="POST">
    <table width="90%" bgcolor="CCCC99">
    <tr>
    <td width="25%"><font face="arial" size=+1 color="004080">Project ID</font>

    <td width="75%"><font face="arial" size=+1
    color="004080">#projectid#</font><br>
    <input type="hidden" value="#projectid#" maxrows=1>
    </td>
    </tr>
    </table>

    <table WIDTH="90%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="50%" bgcolor="COCOCO"><font face="Arial"
    color="004080"><strong>#Section# - #Category#</strong></font>
    <a name="#category#">
    </td>
    <td width="25%" bgcolor="COCOCO" align="right"><font face="arial" size=-1>
    <a href="project_specsentry.cfm?projectid=#projectid# ">Enter New
    Specification</a>

    </font>
    </td>
    <td width="25%" bgcolor="COCOCO" align="right"><font face="arial" size=-1>
    <a href="##top">Back to Top</a>

    </font>
    </td>
    </tr>
    </table>

    <table WIDTH="90%" border="0" cellpadding="0" cellspacing="0">
    <tr bgcolor="COCOCO">
    <td width="5%" valign="top">
    <font face="arial" size=-1 color="004080">Spec ID</font>
    </td>
    <td width="10%" valign="top">
    <font face="arial" size=-1 color="004080">Spec No</font>
    </td>
    <td width="30%" valign="top">
    <font face="arial" size=-1 color="004080"><b>Spec Title</b></font>
    <br><font face="arial" size=-1 color="004080"><b>Specification
    Description</b></font>
    <br>
    <font face="arial" size=-1 color="004080">Location</font>
    </td>
    <td width="30%" valign="top">
    <font face="arial" size=-1 color="004080"><b>Sku / Item</b></font>


    </td>
    <td width="15%" valign="top">
    <font face="arial" size=-1 color="004080">Allowance</font>
    </td>
    </td>
    <td width="5%" valign="top" align="right">
    <!---<font face="arial" size=-1 color="004080"><b>Qty</b></font>------->


    </td>


    </tr>
    </table>

    <cfoutput>




    <table WIDTH="90%" border="0" cellpadding="0" cellspacing="1">
    <tr bgcolor="###IIF(currentrow MOD 2,DE('99CCCC'),DE('FOFOFO'))#">
    <td width="10%" valign="top">
    <font face="arial" size=-1 color="004080">#specno#</font>
    <p>
    <a
    href="project_specsupdate.cfm?projspecid=#projspec id#&projectid=#projectid#">
    <font face="arial" size=-1 color="">Update #projspecid#
    </font>
    </a>
    <br>
    <!----<input type="hidden" name="projectid" value="#projectid#">-------->
    <p>
    <font face="arial" size=-1 color="">
    </font> <br>


    <INPUT Type="Checkbox" Name="dontshow" Value="1">#projspecid#<br>


    <!----<CFIF dontshow NEQ 0>
    <INPUT TYPE="Checkbox" name="dontshow" value=?1" CHECKED>
    <CFELSE>
    <INPUT TYPE="Checkbox" name="dontshow" value=?1" >

    </CFIF>
    <CFIF NOT IsDefined("dontshow")>
    <CFSET dontshow = 0>
    </CFIF>-------------->
    </td>
    <td width="15%" valign="top">

    <font face="arial" size=-1 color="004080"><b>#spectitle#</b></font><br>

    </font>



    <p>


    <a
    href="project_specsdelete.cfm?projspecid=#projspec id#&projectid=#projectid#">
    <font face="arial" size=-1 color="FF0000">
    Delete Spec</font></a>
    </td>
    <td width="55%" valign="top">
    <font face="arial" size=-1
    color="004080">#paragraphformat(specification)#</font>

    <p>
    <font face="arial" size=-1 color="004080">SKU:#sku#</font>
    <font face="arial" size=-1 color="004080"><b>#itemname#</b></font>



    <a href="product_detail.cfm?productid=#productid#">
    <font face="arial" size=-2 color="">
    (#productid#)</font></a>
    <br>
    <font face="arial" size=-2 color="004080">Location: #location#</font>
    &nbsp;&nbsp;&nbsp;

    <font face="arial" size=-2 color="004080">Spec Date:
    #dateformat(specdate,"mm-dd-yy")#</font>
    &nbsp;&nbsp;

    </td>



    <td width="10%" valign="top" align="right">
    <font face="arial" size=-1 color="004080">#dollarformat(allowance)#</font>

    <p>
    <cfif reviseddate is not "">
    <font face="arial" size=-1 color="FF0000">Revised Date:
    #dateformat(reviseddate,"mm-dd-yy")#</font>
    <cfelse>
    &nbsp;
    </cfif>

    </td>

    </tr>
    </table>


    </cfoutput>
    <p>


    </cfoutput>

    <table width="90%" bgcolor="E7E7D9">
    <tr>
    <td width="25%"></td>

    <td width="75%">
    <input type="submit" value="Don't Show Specifications">
    </td>
    </tr>

    </table>
    </form>

    --------------------------------------------------
    Here is Action Form
    Query = <cfquery name="updatespecs" datasource="#application.ds#">
    SELECT
    project_specs.projspecid,
    project_specs.projectid,
    project_specs.dontshow

    From project_specs

    Where project_specs_projectid=#projectid#

    </cfquery>

    Here is Loop code
    <cfloop query="updatespecs">
    <cfupdate datasource="#application.ds#"
    tablename="project_specs">
    Update project_specs (projspecid,dontshow)
    VALUES('#updatespecs.projspecid#','#updatespecs.do ntshow#' )>
    </cfloop>

    ----------------------------------------Here is Error----------------------
    Error resolving parameter PROJECTID

    ColdFusion was unable to determine the value of the parameter. This problem is
    very likely due to the fact that either:

    1. You have misspelled the parameter name, or
    2. You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or
    CFTABLE tag.

    The error occurred while evaluating the expression:

    #projectid#

    The error occurred while processing an element with a general identifier of
    (#projectid#), occupying doent position (18:26) to (18:36).

    terryt Guest

  2. #2

    Default Re: Check boxes -Update many Items

    Is the spelling correct? ... projecid ... Should it be projectid?

    <FORM ACTION="project_specsshowupdateinsert.cfm?projecid =#projectid#" METHOD="POST">

    ssmacwilliams Guest

  3. #3

    Default Re: Check boxes -Update many Items

    There are a couple of issues:

    First, your error is because your not naming your hidden project ID field:

    Your entry:
    <input type="hidden" value="#projectid#" maxrows=1>
    Correct Entry:
    <input type="hidden" name= "projectID" value="#projectid#">

    Next, when using a checkbox, if the user doesn't check it, it will be
    undefined on the action page. You will need
    to check for its existance, something like:

    <CFSET ShowSpecs = 1>
    <CFIF IsDefined("form.dontshow") AND Form.dontshow EQ 1>
    <CFSET ShowSpecs = 0>
    </CFIF>

    Then use ShowSpecs when checking if you should show the specs or not

    James74 Guest

  4. #4

    Default Re: Check boxes -Update many Items

    Read the code I posted here
    <a target=_blank class=ftalternatingbarlinklarge
    href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=7&threa
    did=1158930&enterthread=y">http://www.adobe.com/cfusion/webforums/forum/messagev
    iew.cfm?catid=7&threadid=1158930&enterthread=y</a>

    Dan Guest

Similar Threads

  1. eliminating like items in dynamically loaded list boxes
    By criticalelement in forum Coldfusion Database Access
    Replies: 3
    Last Post: June 27th, 02:07 PM
  2. Check Boxes
    By Claude Carlos in forum Adobe Acrobat Windows
    Replies: 14
    Last Post: April 29th, 10:17 PM
  3. P. S. re check boxes
    By K in forum Web Design
    Replies: 1
    Last Post: February 22nd, 03:24 PM
  4. Check to see if Check Boxes are Checked
    By Lyn in forum ASP Database
    Replies: 2
    Last Post: December 15th, 06:00 PM
  5. Check boxes
    By Nathan in forum Microsoft Access
    Replies: 2
    Last Post: September 15th, 03:37 PM

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