<cfformitem type="script">
       function doubleCheck(){
        var msg = 'The massage you want to display';

        var alertSettings:Object = {title:'Warning!', message: msg,
headerHeight:27, x: 60, y: 10}
        errorpopup = mx.managers.PopUpManager.createPopUp(this,
FormErrorException, true, alertSettings);
        
       }
</cfformitem>

and in the grid
 onchange="(employee_grid.selectedItem.email == '') ? doubleCheck() : Void;"


If you are using the CF7.0.1 it would work fine if not change the
cfformitem to a save content and do the test in the savecontent code
something like this:

<cfsavecontent variable="onchange">
       if (employee_grid.selectedItem.email == '') {
        var msg = 'The massage you want to display';

        var alertSettings:Object = {title:'Warning!', message: msg,
headerHeight:27, x: 60, y: 10}
        errorpopup = mx.managers.PopUpManager.createPopUp(this,
FormErrorException, true, alertSettings);
        
       }
</cfsavecontent>

and in the grid
 onchange="#onchange#"

On 11/22/05, Nick Han <[EMAIL PROTECTED]> wrote:
> It's not empty.  The email value is visible on the grid.
>
> -----Original Message-----
> From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 21, 2005 7:35 PM
> To: CF-Talk
> Subject: RE: easy cfgrid question
>
> Because your email field is empty maybe?
>
> Try
>
> alert("Enter an email address");
>
> instead
>
> ...:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -----Original Message-----
> From: Nick Han [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 21, 2005 10:01 PM
> To: CF-Talk
> Subject: RE: easy cfgrid question
>
> Bobby,
>   I am getting a blank value in the alert box with either
>
> alert(employee_grid.dataProvider[employee_grid.selectedIndex]['user_emai
> l'].text);
>
> or
>
> alert(employee_grid.dataProvider[employee_grid.selectedIndex]['user_emai
> l']);
>
> I don't see the value passed from the cfgrid.
>
> -----Original Message-----
> From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 21, 2005 6:49 PM
> To: CF-Talk
> Subject: RE: easy cfgrid question
>
> <cfsavecontent variable="onchange">
> if
> (employee_grid.dataProvider[employee_grid.selectedIndex]['user_email']
> ==
> '')
> {
> alert('Please enter an email address');
> }
> </cfsavecontent>
>
>
>
> <cfform name="GridForm" action="cfgrid3.cfm" format="flash"
> timeout="200">
>
>
> <cfgrid name="employee_grid"
>                 query="empdata" selectmode="edit" insert="yes"
> delete="yes"
>                 rowheaders="no"
>                 format="flash"
>                 height="200"
>                 onchange="#onchange#" />
>
>    <br>
>
>    <cfinput type="Submit" name="test" value="Submit">
>
> </cfform>
>
>
> This is just an example, its not going to work for what you are trying
> to
> do. You wont want to do it on change but rather submit and youll want to
> loop over all of the dataprovider checkin the emails, not just a
> specific
> one. But this should give you a good idea of how to reference them.
>
> Hope it helps.
>
> (I also couldn't think of the length check function in flash but youll
> want
> atleast that rather than == '')
>
> .....:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224998
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to