Highlighted

Does anyone have an example of using onvalidate with an editable ( applet) CFGRID.

New Here ,
Feb 25, 2016

Copy link to clipboard

Copied

How do you access the form values in javascript using the variables that are passed to the onvalidate function? I cannot find an example anywhere.

<cfform>

<cfgrid name = "FirstGrid" width = "500" height="500"  bgcolor="##FFF8DC"

   onvalidate="validateMyFields"

   query = "GetCourses" insert = "Yes" delete = "Yes"

   font = "Tahoma"

  rowHeaders = "No"

   colHeaderBold = "Yes"

   selectMode = "EDIT"

   insertButton = "Insert a Row" deleteButton = "Delete selected row" >

</cfgrid><br>

<cfinput type="submit" name="gridEntered">

</cfform>

<script>

function validateMyFields(form, field, value) {

        // What do you do to acces the value of the fields in the cfgrid here???

}

</script>

TOPICS
Advanced techniques

Views

444

Likes

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

Does anyone have an example of using onvalidate with an editable ( applet) CFGRID.

New Here ,
Feb 25, 2016

Copy link to clipboard

Copied

How do you access the form values in javascript using the variables that are passed to the onvalidate function? I cannot find an example anywhere.

<cfform>

<cfgrid name = "FirstGrid" width = "500" height="500"  bgcolor="##FFF8DC"

   onvalidate="validateMyFields"

   query = "GetCourses" insert = "Yes" delete = "Yes"

   font = "Tahoma"

  rowHeaders = "No"

   colHeaderBold = "Yes"

   selectMode = "EDIT"

   insertButton = "Insert a Row" deleteButton = "Delete selected row" >

</cfgrid><br>

<cfinput type="submit" name="gridEntered">

</cfform>

<script>

function validateMyFields(form, field, value) {

        // What do you do to acces the value of the fields in the cfgrid here???

}

</script>

TOPICS
Advanced techniques

Views

445

Likes

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
Feb 25, 2016 0
BKBK LATEST
Adobe Community Professional ,
Feb 28, 2016

Copy link to clipboard

Copied

Any attempt to solve this would only be wasting time. The Coldfusion community generally agrees that Coldfusion's UI tags, of which cfform and cfgrid are examples, are unreliable. Use, for example, datatables instead.

Likes

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
Reply
Loading...
Feb 28, 2016 0