473,471 Members | 4,648 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using onValidate in CFGRID

Haitashi
96 New Member
I have the following grid:
Expand|Select|Wrap|Line Numbers
  1.     <cfgrid name="gridChartType"
  2.         delete="true"
  3.         deletebutton="Remove"
  4.         insert="true"
  5.         insertbutton="Add"
  6.         width="714"
  7.         height="500"
  8.         format="flash"
  9.         query="variables.qChartType"
  10.         onValidate="checkValues"
  11.         selectmode="edit">
  12.             <cfgridcolumn name="id" display="false" />
  13.             <cfgridcolumn header="Name" width="500" name="chart" />
  14.             <cfgridcolumn header="Code" width="214" name="code" />
  15.     </cfgrid>
The function called "checkValues" is a function that exist in a JS file. This file is inclided at the beggining of the file but outside the form.

However, it doesn't seem to be working. When I add/edit/delete anything in the cgrid, that function doesn't execute. What I need to validate is that the cfgridcolumn called code doesn't exceed 3 characters.

So, my questions are:
  1. Am I calling the JS function the right way?
  2. Is the way I'm including the JS file correct?
  3. Does anyone have a link to a working example/tutorial of cfgrip that includes validation "how to"?

Maybe my function isn't written correctly in the JS file (but that would be a Javascript issue and not a CF issue)

Thanks in advance!!
Feb 13 '08 #1
2 3609
Haitashi
96 New Member
My problem was that I was using the flash cfgrid format and onValidate only works with the applet format.

Now I gotta figure out if it's possible to validate data while using the flash format =P
Feb 13 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
Firstly, check that the JS is correct by changing it to applet. If it works, then you may need to look at an ActionScript solution.
Feb 14 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: rawCoder | last post by:
Hi All, I have a *.cer file, a public key of some one and I want to encrypt some thing using this public key. Can someone point me to a sample code for Encrypting some file using...
1
by: Mike | last post by:
When trying to compile (using Visual Web Developer 2005 Express Beta; frameworkv2.0.50215 ) the source code below I get errors (listed below due to the use of ICallBackEventHandler. Ultimately I...
10
by: Christopher Benson-Manica | last post by:
Why can't I use a class destructor in a using declaration: using MyClass::~MyClass; ? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org ...
17
by: beliavsky | last post by:
Many of my C++ programs have the line using namespace std; but the "Accelerated C++" book of Koenig and Moo has many examples where the library names are included one at a time, for example ...
8
by: Petter Reinholdtsen | last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to compile a program using 'using namespace std;' at the top. The reason seem to be that the compiler refuses to accept 'using...
14
by: john.burton.email | last post by:
I've done some extensive searching and can't seem to find an answer to this - Is it correct to using "using" with templates, for example: using std::vector; Or do I need to specify the type...
5
by: Enos Meroka | last post by:
Hallo, I am a student doing my project in the university.. I have been trying to compile the program using HP -UX aCC compiler, however I keep on getting the following errors. ...
12
by: Calum Grant | last post by:
In older C++ computer books, you'll often see using namespace std; even in my 1996 copy of Stroustrup. Nowadays, it seems to be considered better to qualify names to make it clearer what...
1
by: Matt | last post by:
Hi everyone, I'm using the command mysqlcheck --all-databases --auto-repair --silent and I see these warnings (listed below) on a daily occurrence. Is mysqlcheck causing these warnings? I...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.