CE steals focus

Last post 08-26-2005, 10:37 AM by jdurra. 2 replies.
Sort Posts: Previous Next
  •  08-18-2005, 5:02 PM 9755

    CE steals focus

    I have multiple instances of CuteEditor on one page (that is rather long) and it keeps stealing the focus to the final instance of CE on the page, making many required fields go offscreen.

    I searched the forum and there is only one thread about this from 2003 and it says that the issue was resolved with the latest version of CuteEditor. Considering that we just purchased it, I'm sure we have a much newer version than what the post is referring to.

    Because the editors take longer to load than the rest of the page, a simple onLoad focus won't work (I've tried it).

    Is there a property that I'm missing somewhere? This is a real issue for our implementation.

    Thanks,
    Jess
  •  08-22-2005, 3:58 PM 9853 in reply to 9755

    Re: CE steals focus

    Jess,
     
    If you have mutiple editors in a single page, the last editor get the focus automatically.
     
    We will resolve this problem in the next version. Sorry for the inconvenience.
     
    A workaround for this issue is putting some javascript code in the bottom of your page and giving the focus back to the element you want.
     
    This is an example:
     
    <!-- #include file = "CuteEditor_Files/include_CuteEditor.asp" -->
    <html>
       
    <body>
           
    <form name="theForm" action="Get_HtmlContent.asp" method="post" ID="Form1">
           
    <input id="myinput" name="myinput" type=text>
               
    <%
                   
    dim content content ="test"Dim editor Set editor =New CuteEditor editor.ID ="Editor1"
                    editor.Draw()
    %>
                <input type="submit" value="Submit" ID="Submit2" NAME="Submit1">
               
    <script> document.getElementById('myinput').focus; </script>
            </form>
    </body>
    </html>

    Hope it helps.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-26-2005, 10:37 AM 9935 in reply to 9853

    Re: CE steals focus

    Nope, unfortunately that didn't work. I tried multiple placements of the <script> tags (above and below the closing </form> tag) and added the id to focus on to about 10 different elements. But no matter what, in IE, the focus goes to the last instance of CE. It's okay in Firefox (has been all along), but that's fairly irrelevant for the client's audience.

    Any other thoughts? My client is testing this today and I know it's going to be an issue for them.

    ------------------------------------
    UPDATE:
    Got it working. The string passed to getElementById had to be enclosed in quotes and the element it was referencing had to be a visible (not hidden) input field. Once I did that combo, it worked!
    ------------------------------------

    Thanks,
    Jess
View as RSS news feed in XML