AjaxOnLoad is probably the way to go. Set up your .focus() line inside a
function:

init = function(){
document.LoginForm.AccessID.focus();
}

and add :
<cfset AjaxOnLoad('init')>

to the page where you now have the document.LoginForm.AccessID.focus(); line
.
AjaxOnLoad cannot pass in any parameters to the function specified. In this
case, you don't need any, but I've had several occasions where it would have
been nice to be able to do that.

On Mon, Sep 27, 2010 at 3:56 PM, John Pullam <jpul...@mcleansystems.com>wrote:

>
> alert(document.LoginForm); gives the message undefined.
>
> I assume that means that at the time the JavaScript is executing there is
> no such object in the DOM.
>
> Could the JavaScript be executing at the wrong time? I'm wondering about
> using some sort of onAjaxLoad thing (but I have no experience doing that).
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:337587
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to