1 Reply Latest reply on Nov 1, 2007 6:46 PM by CutterBl

    cfinput inside tables... bind/cfgrid?

    Rand8086
      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 [j]#">

      </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!