我是 ColdFusion 的新手,我正在努力弄清楚如何做一些我可以在 MS Access 中轻松完成的简单功能。
我不断收到错误消息:没有名称为“提交”的方法。此错误仅因表单格式为 flash 而发生。
任何帮助将不胜感激。
<html>
<cfparam name="form.state" default="">
<cfparam name="form.lastname" default="">
<!---Grid Source--->
<cfquery name="getArtists" datasource="cfartgallery">
SELECT A.*
FROM ARTISTS A
WHERE
1=1
AND STATE like <cfqueryparam value="%#form.state#%" cfsqltype="CF_SQL_VARCHAR" maxlength="255">
AND LASTNAME like <cfqueryparam value="%#form.lastname#%" cfsqltype="CF_SQL_VARCHAR" maxlength="255">
ORDER BY A.LASTNAME, A.FIRSTNAME
</cfquery>
<head>
</head>
<body style="padding:20px;">
<cfform action="TEST.cfm" method="post" format="flash">
<cfformgroup type="horizontal" style="backgroundAlpha:0;font-size:12;color:##000;">
<cfformgroup type="vertical" width="100">
<!---Query for STATE--->
<cfquery name="getState" datasource="cfartgallery">
SELECT A.STATE
FROM ARTISTS A
WHERE
1=1
AND LASTNAME like <cfqueryparam value="%#form.lastname#%" cfsqltype="CF_SQL_VARCHAR" maxlength="255">
</cfquery>
<!---STATE Dropdown--->
<cfselect name="state" query="getState" queryposition="below"
label="State:"
value="STATE"
display="STATE"
required="no"
selected="#form.state#"
onchange="submit();"
style="backgroundAlpha:0;" width="125">
<option></option>
</cfselect>
</cfformgroup>
<cfformgroup type="vertical" width="100">
<!---Query for LastName--->
<cfquery name="getLast" datasource="cfartgallery">
SELECT A.LASTNAME
FROM ARTISTS A
WHERE
1=1
AND STATE like <cfqueryparam value="%#form.state#%" cfsqltype="CF_SQL_VARCHAR" maxlength="255">
</cfquery>
<!---LastName Dropdown--->
<cfselect name="lastname" query="getLast" queryposition="below"
label="Last Name:" value="LASTNAME" display="LASTNAME"
selected="#form.lastname#"
required="no"
onchange="submit();"
style="backgroundAlpha:0;" width="125">
<option></option>
</cfselect>
<a href="TEST.cfm"><input type="button" value="Reset"></a>
</cfformgroup>
</cfformgroup>
<cfformitem type="spacer" height="20"/>
<!---Grid--->
<cfgrid name="myGrid" query="getArtists" format="html">
<cfgridcolumn name="ARTISTID" header="ARTISTID" width="75" headeralign="center" dataalign="center"/>
<cfgridcolumn name="FIRSTNAME" header="FIRSTNAME" width="100" headeralign="center" dataalign="center"/>
<cfgridcolumn name="LASTNAME" header="LASTNAME" width="75" headeralign="center" dataalign="center"/>
<cfgridcolumn name="ADDRESS" header="ADDRESS" width="100" headeralign="center" dataalign="center"/>
<cfgridcolumn name="CITY" header="CITY" width="125" headeralign="center" dataalign="center"/>
<cfgridcolumn name="STATE" header="STATE" width="125" headeralign="center" dataalign="center"/>
<cfgridcolumn name="POSTALCODE" header="POSTALCODE" headeralign="center" dataalign="center"/>
<cfgridcolumn name="EMAIL" header="EMAIL" width="125" headeralign="center" dataalign="center"/>
<cfgridcolumn name="PHONE" header="PHONE" headeralign="center" dataalign="center"/>
<cfgridcolumn name="FAX" header="FAX" headeralign="center" dataalign="center"/>
<cfgridcolumn name="THEPASSWORD" header="THEPASSWORD" headeralign="center" dataalign="center"/>
</cfgrid>
</cfform>
</body>
</html>