Question
A little help with ajax cfdiv tag
Hi, i am displaying my categories records in atable, and
against each category i have an edit link.
i am trying like that if i click the edit link [It is not a button]. the page should gets loaded with a textbox and category name already filled and then i click submit to submit the form.
I am using the code as below:
<cfoutput query="showcategories">
<tr>
<td>#trim(category)#</td>
<td><a href="##" onClick="?catID=#catID#">Edit</a></td>
</tr>
</cfoutput>
<cfif isdefined('url.catID')>
<cfdiv bind="url:divsource.cfm?catID={catID}" ID="theDiv" style="background-color:##CCffFF; color:red; height:350"/>
</cfif>
mydivsource page contains this:
<cfdump var="#url#">
<cfinvoke component="cfc.product" method="categories" chkcatID="#URL.catID#" returnvariable="getCatID"/>
<cfform name="categoryByID">
<cfinput type="text" name="categoryname" value="#getCatID.category#" tooltip="The Category Name" tabindex="1">
<cfinput type="hidden" name="catID" value="#getCatID.catID#">
<cfinput type="button" name="button2" value="Edit Category">
</cfform>
when i try to run, i get the error as like below:
syntax error
[Break on this error] ?catID=3
can anyone guide me in this? plz i m very new to ajax stuff in cf.
i am trying like that if i click the edit link [It is not a button]. the page should gets loaded with a textbox and category name already filled and then i click submit to submit the form.
I am using the code as below:
<cfoutput query="showcategories">
<tr>
<td>#trim(category)#</td>
<td><a href="##" onClick="?catID=#catID#">Edit</a></td>
</tr>
</cfoutput>
<cfif isdefined('url.catID')>
<cfdiv bind="url:divsource.cfm?catID={catID}" ID="theDiv" style="background-color:##CCffFF; color:red; height:350"/>
</cfif>
mydivsource page contains this:
<cfdump var="#url#">
<cfinvoke component="cfc.product" method="categories" chkcatID="#URL.catID#" returnvariable="getCatID"/>
<cfform name="categoryByID">
<cfinput type="text" name="categoryname" value="#getCatID.category#" tooltip="The Category Name" tabindex="1">
<cfinput type="hidden" name="catID" value="#getCatID.catID#">
<cfinput type="button" name="button2" value="Edit Category">
</cfform>
when i try to run, i get the error as like below:
syntax error
[Break on this error] ?catID=3
can anyone guide me in this? plz i m very new to ajax stuff in cf.
