RE: Setting Focus to Field (does not work on .cfm file)

2000-05-22 Thread Perez, Bismark

I have a question, does anybody knows how can I get the Coldfusion server to
process ALL the JavaScript code?  I have been trying to use the
onfocus="..." for the body tag (see bellow) but it still does not work... It
does work fine if I rename the .cfm file to .htm (same code and everything,
just renaming file), but somehow for the .cfm file the JavaScript code does
not work.. 

TIA

Bismarck Perez


-Original Message-
From: Reilly, Jim [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 15, 2000 11:42 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Setting Focus to Field



The names are case sensitive.
So, if your form is NAMED  "TEST"

then you will need:
body onload="document.TEST.fieldname.focus()"

whereas:
body onload="document.Test.fieldname.focus()"
would NOT work.

Same goes for the fieldname..

Hope this helps!



-Original Message-
From: Perez, Bismark [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 15, 2000 11:27 AM
To: Cf-Talk (E-mail)
Subject: Setting Focus to Field


Hello there,

I was looking in the Allaire tutorials and found a way to set the focus to a
field as soon as the page is loaded, the problem is that it does not work
for me, can somebody tell me what I'm doing wrong...

body onload="document.someform.fieldname.focus()"

TIA
Bismarck Perez


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Setting Focus to Field (does not work on .cfm file)

2000-05-22 Thread Dave Watts

 I have a question, does anybody knows how can I get the
 Coldfusion server to process ALL the JavaScript code? I
 have been trying to use the onfocus="..." for the body
 tag (see bellow) but it still does not work... It does
 work fine if I rename the .cfm file to .htm (same code
 and everything, just renaming file), but somehow for the
 .cfm file the JavaScript code does not work..

You can't get the CF server to process any of the JavaScript code! That gets
processed on the client!

Your specific problem may be caused by something you're putting in your
application.cfm file. For example, if you've got a BODY tag in
application.cfm, your BODY tag within the specific document will be ignored.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Setting Focus to Field

2000-05-15 Thread Reilly, Jim


The names are case sensitive.
So, if your form is NAMED  "TEST"

then you will need:
body onload="document.TEST.fieldname.focus()"

whereas:
body onload="document.Test.fieldname.focus()"
would NOT work.

Same goes for the fieldname..

Hope this helps!



-Original Message-
From: Perez, Bismark [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 15, 2000 11:27 AM
To: Cf-Talk (E-mail)
Subject: Setting Focus to Field


Hello there,

I was looking in the Allaire tutorials and found a way to set the focus to a
field as soon as the page is loaded, the problem is that it does not work
for me, can somebody tell me what I'm doing wrong...

body onload="document.someform.fieldname.focus()"

TIA
Bismarck Perez


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Setting Focus to Field

2000-05-15 Thread kraybill

That should work, assuming of course that "someform"  has been 
replaced with the correctly-spelled name of your form and "fieldname" with the name of 
your field...

Gene Kraybill

Bismarck Perez wrote:

 I was looking in the Allaire tutorials and found a way to set the focus to a
 field as soon as the page is loaded, the problem is that it does not work
 for me, can somebody tell me what I'm doing wrong...
 
 body onload="document.someform.fieldname.focus()"
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Setting Focus to Field

2000-05-15 Thread John Allred

"Reilly, Jim" wrote:
 
 body onload="document.TEST.fieldname.focus()"
 

If I already have an onload in a page, how would I add this one too? I'm
doing some preloading, and I'd like to also set the focus to a form
field.

Thanks,
--John
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Setting Focus to Field

2000-05-15 Thread Olive, Christopher M Mr USACHPPM

you could either combine the stuff into one function call (eg...)

HEAD
...
SCRIPT
function doonloadstuff() {
...
}

/SCRIPT
/HEAD

body onload="doonloadstuff();"

or you could separate them with semis. (eg...)

body onload="document.TEST.fieldname.focus(); dootherstuff();
dosomemorestuff();"

Chris Olive
DOHRS Website Administrator
[EMAIL PROTECTED]


-Original Message-
From: John Allred [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 15, 2000 2:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Setting Focus to Field


"Reilly, Jim" wrote:
 
 body onload="document.TEST.fieldname.focus()"
 

If I already have an onload in a page, how would I add this one too? I'm
doing some preloading, and I'd like to also set the focus to a form
field.

Thanks,
--John

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Setting Focus to Field

2000-05-15 Thread Reilly, Jim

John,

Create and Call a JS function to handle the
current on load js code as well as the focus call
like: 

HTML

HEAD
TITLE Test onload/TITLE

script language="JavaScript"

!--
function CheckOnLoad()
{   
   your other js code

   document.TEST.fieldname.focus();

   .. any other js code
}


//--
/script

/HEAD


body onload="CheckOnLoad()"

rest of body.

/body
/html


Jim



-Original Message-
From: John Allred [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 15, 2000 2:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Setting Focus to Field


"Reilly, Jim" wrote:
 
 body onload="document.TEST.fieldname.focus()"
 

If I already have an onload in a page, how would I add this one too? I'm
doing some preloading, and I'd like to also set the focus to a form
field.

Thanks,
--John

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.