• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfinput inside tables... bind/cfgrid?

Guest
Oct 31, 2007 Oct 31, 2007

Copy link to clipboard

Copied

New to Coldfusion. Using Coldfusion 8.

I've been tasked with setting up a 9X9 grid (no row or column headers). The user inputs a value in any cell, then either hits enter or clicks outside the table and that must trigger code that looks at another grid to see if they entered the correct value, then print a message somewhere saying "valid" or "invalid".

I've tried having 81 cfinputs. But when I want to use Ajax to run my test, I'm having problems.

Do I need to use CFGRID? It seems geared more toward a spreadsheet type implementation than what I'm looking for.

Can I do what I need to, using only CF/Ajax, or will I have to use JavaScript?

Sample code currently:

<cfform>
<table border="1">
<cfloop from="1" to="9" index="i">
<tr>
<cfloop from="1" to="9" index="j">
<td>
<cfinput type="text"
name="a#i##j#"
size="5"
maxlength="5"
mask="99999"
style="background-color: #color#"
value="#gridObj #">

</td></cfloop>
</tr></cfloop>
</cftable>

<cfinput name="verPuzzle"
type="text"
bind="cfc:CFCTools.verifyGrid({a11})">

</cfform>

CFCTools.verifyGrid currently just cfreturn's a test message, it will eventually say either "valid" or "invalid".
Note, it doesn't like the a11 syntax, but it will still work for that cell. This is the closest I've gotten to results but it doesn't really work.

Thanks for any tips!
TOPICS
Advanced techniques

Views

288

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

LATEST
Your best bet is to use cfgrid in the 'edit' mode, and also do some heavy research on the grid, looking at the underlying ExtJS 1.1.1 API

http://extjs.com/deploy/ext/docs/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation