I said form, not cfform. Cf adds onload to the compiled <form> tag, which
then proceeds to not work since <form> doesn't have an onload method.

But don't take my word for it, try it yourself:

<cfform name="myForm" onload="alert('my onload worked');">
<cfinput type="text" name="myText">
</cfform>


On Fri, Sep 24, 2010 at 9:17 AM, Andrew Scott <[email protected]>wrote:

>
> CFForm does have an onLoad attribute.
>
> Regards,
> Andrew Scott
> http://www.andyscott.id.au/
>
>
> > -----Original Message-----
> > From: Michael Grant [mailto:[email protected]]
> > Sent: Friday, 24 September 2010 11:06 PM
> > To: cf-talk
> > Subject: Re: Trying to set cfform focus in an Ajax window
> >
> >
> > Two things. First the way you are referencing your form is by name, not
> ID.
> > So you  need to add this: name="LoginForm" to your cfform tag.\
> >
> > Also, i don't think that form has an onload function. Just put this at
> the
> > bottom of your code:
> >
> > <script>
> > document.LoginForm.AccessID.focus();
> > </script>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337460
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to