Re: cflayout weird problem

2008-08-25 Thread BJ McShane
Dave,  Thanks for the help.  The code sample worked great. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311499
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: cflayout weird problem

2008-08-22 Thread Dave Phillips
To my knowledge, this is a browser issue, not a cflayout issue, as you will
get different results in different browsers.

You can avoid this completely by using javascript to validate your fields.

Dave

-Original Message-
From: BJ McShane [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2008 3:24 PM
To: CF-Talk
Subject: cflayout weird problem

I'm using the cflayout for tabs on my form.  When the form submits, I check
a couple of the fields for error checking and if the fields are wrong or not
filled in I send the user back using the history.back() function.  The forms
returns but all the input the user put in is gone.  If I take off the
cflayout and just have a regular form the input data stays if there is an
error.  Does any one know of a work around or something I can do.

thanks,

bj 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311436
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cflayout weird problem

2008-08-22 Thread BJ McShane
Dave, thanks for the reply.  I did run it in firefox and the data doesn't get 
wiped out in that browser.  So you are right it looks like it is a browser 
issue.  I've never validated with just javascript, I'll have to look around for 
examples.

thanks

bj 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311438
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: cflayout weird problem

2008-08-22 Thread Dave Phillips
BJ,

Post your form code (or a snippet) and what fields you're trying to validate
and what you want validated and we can help.

Also, check out the CF docs for CFFORM as it has a lot of built-in
javascript validation that you can utilize through CF tags like CFINPUT and
so on.

Dave

-Original Message-
From: BJ McShane [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2008 3:59 PM
To: CF-Talk
Subject: Re: cflayout weird problem

Dave, thanks for the reply.  I did run it in firefox and the data doesn't
get wiped out in that browser.  So you are right it looks like it is a
browser issue.  I've never validated with just javascript, I'll have to look
around for examples.

thanks

bj 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311441
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cflayout weird problem

2008-08-22 Thread BJ McShane
Dave,

  I am using cfform and some of the validation on tags with it.  The two places 
I don't is a custom tag I'm using cf_betterselect and the regular select.  the 
betterselect allows the user to type and narrow down the list.  the select tag 
I want the user to select a location and not have it default to one so I put in 
an empty option tag.  With this the validation will not work when I set the 
cfselect tag to required.

Here's my code:

cfform action=NewEmployeeEntry.cfm name=newEmpInsertForm 
method=POST
cflayout type=tab style=width:900;
cflayoutarea title=Employee Info 
style=background-color:##CC
table id=formTable
tr
td colspan=4 align=right  
input type=submit 
name=insertHRpartButton value=Update
/td
/tr 
trtd colspan=4hr width=80% 
align=center/td/tr
tr
thName:/th
td
cfinput type=text name=p_employeeName 
class=boxes size=50 maxlength=70 required=yes message=Please enter the 
new employee's name onChange=spacesCk(this);
/td
thEmployee No.:/th
td
cfinput type=text name=p_employeeNo 
class=boxes size=4 maxlength=4 required=yes message=Please enter the 
employee's number validate=integer onChange=spacesCk(this);
/td
/tr
tr
thTitle:/th
td colspan=3
cfinput type=text name=p_employeeTitle 
class=boxes size=80 maxlength=100 required=yes message=Please enter 
the new employee's title onChange=spacesCk(this);
/td
/tr
tr
thRCN:/th
td   
cfinvoke 
component=/hr/hr_CFCs/HR_employee method=HREmployeeRCNInfo 
returnvariable=rcnlist
select name=p_employeeRCN class=boxes
option value=/option
cfoutput query=rcnlist
option 
value=#emp_rcn##emp_rcn# - #mid(emp_rcn_name,9,35)#/option
/cfoutput
/select
/td
thTime Reporting Group:/th
td
cfinput type=text 
name=p_employeeRptRCN class=boxes size=6 maxlength=6 required=no 
message=Please enter the new employee's Time Reporting Group 
onChange=spacesCk(this);
/td
/tr
tr
thSupervisor:/th
td 
cf_betterselect name=p_supervisor 
formname=newEmpInsertForm class=boxes
option/option
cfoutput query=EmpInfoQuery
option 
value=#emp_no#,#emp_last_name#,#emp_nick_name##emp_last_name#, 
#emp_nick_name#/option
/cfoutput
/cf_betterselect  

/td
thStart Date:/th
td
cfinput type=text name=p_startDate 
class=boxes size=10 maxlength=10 required=yes validate=date 
message=Please enter the new employee's start date 
onChange=spacesCk(this);   
/td
/tr 
tr
thLocation:/th
td   
cfselect name=p_Location class=boxes 
required=yes message=select location
cfoutput query=EmpLocationsList
option 
value=#emp_locat##emp_locat#/option
/cfoutput
/cfselect
/td
/tr 
!---tr
thFunctional Area:/th

RE: cflayout weird problem

2008-08-22 Thread Dave Phillips
BJ,

Okay, not familiar with cf_betterselect, but the below should still work for
you:  

Change your cfform tag to this:

cfform action=NewEmployeeEntry.cfm name=newEmpInsertForm method=POST
onsubmit=return doSubmit();

IN your head area, add the following:

script
function doSubmit() {
  var oForm = document.newEmpInsertForm;
 if(oForm.p_supervisor.selectedIndex == 0) {
  alert('must select a supervisor');
  return false;
}
  if(oForm.p_location.selectedIndex == 0) {
  alert('must select a location');
  return false;
}
return true;
}
/script

Change your cfselect to:

select name=p_Location class=boxes required=yes message=select
location
  option/option
  cfoutput query=EmpLocationsList
option value=#emp_locat##emp_locat#/option
  /cfoutput
/select


Modify the alerts to say whatever you want to say when wrong information is
entered.

Dave
-Original Message-
From: BJ McShane [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2008 4:54 PM
To: CF-Talk
Subject: Re: cflayout weird problem

Dave,

  I am using cfform and some of the validation on tags with it.  The two
places I don't is a custom tag I'm using cf_betterselect and the regular
select.  the betterselect allows the user to type and narrow down the list.
the select tag I want the user to select a location and not have it default
to one so I put in an empty option tag.  With this the validation will not
work when I set the cfselect tag to required.

Here's my code:

cfform action=NewEmployeeEntry.cfm
name=newEmpInsertForm method=POST
cflayout type=tab style=width:900;
cflayoutarea title=Employee Info
style=background-color:##CC
table id=formTable
tr
td colspan=4 align=right  
input type=submit
name=insertHRpartButton value=Update
/td
/tr 
trtd colspan=4hr width=80%
align=center/td/tr
tr
thName:/th
td
cfinput type=text
name=p_employeeName class=boxes size=50 maxlength=70 required=yes
message=Please enter the new employee's name onChange=spacesCk(this);
/td
thEmployee No.:/th
td
cfinput type=text name=p_employeeNo
class=boxes size=4 maxlength=4 required=yes message=Please enter
the employee's number validate=integer onChange=spacesCk(this);
/td
/tr
tr
thTitle:/th
td colspan=3
cfinput type=text
name=p_employeeTitle class=boxes size=80 maxlength=100
required=yes message=Please enter the new employee's title
onChange=spacesCk(this);
/td
/tr
tr
thRCN:/th
td   
cfinvoke
component=/hr/hr_CFCs/HR_employee method=HREmployeeRCNInfo
returnvariable=rcnlist
select name=p_employeeRCN
class=boxes
option value=/option
cfoutput query=rcnlist
option
value=#emp_rcn##emp_rcn# - #mid(emp_rcn_name,9,35)#/option
/cfoutput
/select
/td
thTime Reporting Group:/th
td
cfinput type=text
name=p_employeeRptRCN class=boxes size=6 maxlength=6 required=no
message=Please enter the new employee's Time Reporting Group
onChange=spacesCk(this);
/td
/tr
tr
thSupervisor:/th
td 
cf_betterselect name=p_supervisor
formname=newEmpInsertForm class=boxes
option/option
cfoutput query=EmpInfoQuery
option
value=#emp_no#,#emp_last_name#,#emp_nick_name##emp_last_name#,
#emp_nick_name#/option
/cfoutput
/cf_betterselect

/td
thStart Date:/th

Re: cflayout weird problem

2008-08-22 Thread BJ McShane
Dave,  I'll try it and let you know.  Thanks for the help. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311448
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4