Re: CFInput text and onclick functionality

2006-09-20 Thread Charlie Griefer
does just adding an onclick=doFunction(); not work?

cfinput type=text value=default onclick=doFunction(this, this.value); /

script type=text/javascript
 function doFunction(ff, ffvalue) {
  if (ffvalue == default) {
   ff.value = ;
  }
 }
/script

?

On 9/20/06, Scott Hoff [EMAIL PROTECTED] wrote:
 I have a text input box and I want to clear out the default values in the 
 event that somoene clicks on it and the default values are still entered in 
 that text box.

 Is there anyway I can recreate the onclick functionality?  The onchange 
 works, but I really need to clear the box when users click on it.

 Thanks all
 Scott

 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: CFInput text and onclick functionality

2006-09-20 Thread Scott Hoff
I tried the following and it did not work.  In the documentation of Coldfusion 
it did not include cfinput text fields as an object that coul do onClick. The 
following example did not work.


cfformitem type=script
 function doFunction(ff) {
  if (ff == 00-00-) {
   ff.value = ;
  }
  else
  {
  alert(test)
  }
 }
/cfformitem

cfinput name=gDb onClick=doFunction(gb); mask=99-99- validate=date 
  value=  width=150 label=Date of Birth message=Please enter 
your date of birth (Example: 05-07-1956)/

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: CFInput text and onclick functionality

2006-09-20 Thread Charlie Griefer
i don't use cfform...so not really sure what's going on.  can you view
the source of the page in the browser and see that the onclick is
still there in the rendered input tag?

and i'm totally not familiar with the cfformitem.  can you not
just do a script tag?

On 9/20/06, Scott Hoff [EMAIL PROTECTED] wrote:
 I tried the following and it did not work.  In the documentation of 
 Coldfusion it did not include cfinput text fields as an object that coul do 
 onClick. The following example did not work.


 cfformitem type=script
  function doFunction(ff) {
   if (ff == 00-00-) {
ff.value = ;
   }
   else
   {
   alert(test)
   }
  }
 /cfformitem

 cfinput name=gDb onClick=doFunction(gb); mask=99-99- 
 validate=date   value=  width=150 label=Date of Birth 
 message=Please enter your date of birth (Example: 05-07-1956)/

 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


RE: CFInput text and onclick functionality

2006-09-20 Thread Dave Watts
 I tried the following and it did not work.  In the 
 documentation of Coldfusion it did not include cfinput text 
 fields as an object that coul do onClick. The following 
 example did not work.
 
 
 cfformitem type=script
  function doFunction(ff) {
   if (ff == 00-00-) {
ff.value = ;
   }
 else
 {
 alert(test)
 }
  }
 /cfformitem
 
 cfinput name=gDb onClick=doFunction(gb); 
 mask=99-99- validate=date   value=  
 width=150 label=Date of Birth message=Please enter your 
 date of birth (Example: 05-07-1956)/

Your names aren't consistent - the field is named gDb but the function
call's argument is gb. And in any case, your argument value should be
fully qualified: document.forms[0].gDb. Use the Javascript keyword this
for your argument value to avoid this sort of problem.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: CFInput text and onclick functionality

2006-09-20 Thread Scott Hoff
I can't because all of the controls are rendered as flash/flex components.

i don't use cfform...so not really sure what's going on.  can you view
the source of the page in the browser and see that the onclick is
still there in the rendered input tag?

...and i'm totally not familiar with the cfformitem.  can you not
just do a script tag?

On 9/20/06, Scott Hoff [EMAIL PROTECTED] wrote:


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: CFInput text and onclick functionality

2006-09-20 Thread Charlie Griefer
On 9/20/06, Dave Watts [EMAIL PROTECTED] wrote:
  I tried the following and it did not work.  In the
  documentation of Coldfusion it did not include cfinput text
  fields as an object that coul do onClick. The following
  example did not work.
 
 
  cfformitem type=script
   function doFunction(ff) {
if (ff == 00-00-) {
 ff.value = ;
}
  else
  {
  alert(test)
  }
   }
  /cfformitem
 
  cfinput name=gDb onClick=doFunction(gb);
  mask=99-99- validate=date   value=
  width=150 label=Date of Birth message=Please enter your
  date of birth (Example: 05-07-1956)/

 Your names aren't consistent - the field is named gDb but the function
 call's argument is gb. And in any case, your argument value should be
 fully qualified: document.forms[0].gDb. Use the Javascript keyword this
 for your argument value to avoid this sort of problem.

d'oH!  i hadn't noticed that.  i just assumed that he used what i gave him :)

-- 
Charlie Griefer


...All the world shall be your enemy, Prince with a Thousand Enemies,
and whenever they catch you, they will kill you. But first they must catch
you, digger, listener, runner, prince with a swift warning.
Be cunning and full of tricks and your people shall never be destroyed.

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


RE: CFInput text and onclick functionality

2006-09-20 Thread Dave Watts
 and i'm totally not familiar with the cfformitem.  can 
 you not just do a script tag?

Oh yeah, I didn't even see that part. You'll need to use the SCRIPT tag to
contain Javascript; the CFFORMITEM tag is used to contain ActionScript for
use with Flash forms, among other things, but won't work for placing
Javascript within HTML forms.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: CFInput text and onclick functionality

2006-09-20 Thread Jim Wright
You may also want to use onFocus to call this function, as that will get 
cases where someone tabs into the field as well as cases where they 
click in.

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: CFInput text and onclick functionality

2006-09-20 Thread Scott Hoff
so is the script validation a javascript that should be placed outside of the 
form in a script /script? Then I need to reference it correctly?

On 9/20/06, Dave Watts [EMAIL PROTECTED] wrote:

d'oH!  i hadn't noticed that.  i just assumed that he used what i gave him :)

-- 
Charlie Griefer


...All the world shall be your enemy, Prince with a Thousand Enemies,
and whenever they catch you, they will kill you. But first they must catch
you, digger, listener, runner, prince with a swift warning.
Be cunning and full of tricks and your people shall never be destroyed.

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


RE: CFInput text and onclick functionality

2006-09-20 Thread Dave Watts
 I can't because all of the controls are rendered as 
 flash/flex components.

I don't think you can include Javascript at all, then. You will have to use
ActionScript instead.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: CFInput text and onclick functionality

2006-09-20 Thread Jon Clausen
Scott,
As Dave said, if you're using a Flash/Flex form you will need to use  
Actionscript to control any form elements.   The .swf file which is  
generated to create the form cannot be accessed through the  
javascript DOM.

For what you want to do, you can just include the AS function in the  
form element.   I think something like this is what you're looking for:

cfinput type=text name=myinput id=myinput value=  
onFocus=myinput.text='' /

-Jon



On Sep 20, 2006, at 3:42 PM, Dave Watts wrote:

 I can't because all of the controls are rendered as
 flash/flex components.

 I don't think you can include Javascript at all, then. You will  
 have to use
 ActionScript instead.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/

 Fig Leaf Software provides the highest caliber vendor-authorized
 instruction at our training centers in Washington DC, Atlanta,
 Chicago, Baltimore, Northern Virginia, or on-site at your location.
 Visit http://training.figleaf.com/ for more information!

 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: CFInput text and onclick functionality

2006-09-20 Thread Denny Valliant
On 9/20/06, Jon Clausen [EMAIL PROTECTED] wrote:
 Scott,
 As Dave said, if you're using a Flash/Flex form you will need to use
 Actionscript to control any form elements.   The .swf file which is

Sorta OT, but:

Anyone had any luck with the bridge?  It's supposed to let the
swf access the DOM and whatnot... I played with it, but don't
remember how well it worked, if at all.

Talking Flash to JS bridge here. (beta @ the labs IIRC).

Thanks,
  Slightly Curious

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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