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




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224938
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to