How can I control focus on multiple editors?

Last post 12-11-2008, 5:55 AM by aydinmesut. 4 replies.
Sort Posts: Previous Next
  •  12-10-2004, 4:58 PM 2968

    How can I control focus on multiple editors?

    Hello,

    I have some aspx pages that have multiple editors on them.  For some reason on a few pages the focus seems to be on the last editor which causes the browser to view the bottom of the page.  Does anyone know how I can explicitly set the focus on a particular editor in the aspx page or code behind?  I can't seem to find any properties for the editor that resemble focus.
     
    Thanks,
    Anthony
  •  12-11-2004, 11:23 AM 2974 in reply to 2968

    Re: How can I control focus on multiple editors?

    Anthony:

    It sounds bizarre. The CE doesn't have code to steal the focus automatically.

    Please check the Multiple Editors in the same Web page example:
     
    http://www.cutesoft.net/example/Multiple.aspx .
     
    Could you check the TabIndex of the controls & editors ?

    Is the site online so can you provide its URL?
     
    Regards,

    Terry
  •  12-11-2004, 3:56 PM 2981 in reply to 2974

    Re: How can I control focus on multiple editors?

    Hi Terry,

    Currently the pages are internal.  I'll try using tab indexes...
     
    Thanks,
    Anthony
  •  03-07-2005, 9:43 AM 4426 in reply to 2974

    Re: How can I control focus on multiple editors?

    Terry,
     
    I am having the same issue with my site.  I have a page with 3 editors and the initial focus appears to be somewhat random.
     
    I also have the same issue on your demo site http://www.cutesoft.net/example/Multiple.aspx when I refresh the page, sometimes initial focus is on the top editor, sometimes it is on the second editor.
     
    Please let me know if there is a way to control this?
     
    Thank you,
    Ryan
  •  12-11-2008, 5:55 AM 46801 in reply to 4426

    Re: How can I control focus on multiple editors?

    function initializeEditor(editor)
    {                
            var iFrameObject = document.getElementById(editor.id + "_Frame");        
            iFrameObject.onfocus = mtextFocus;     
    }    
        
    function mtextFocus()
    {
            var activeEditor = document.getElementById(this.id.replace('_Frame', ''));        
    }
View as RSS news feed in XML