Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for ASP
»
Re: Javascript to set focus
Javascript to set focus
Last post 08-27-2010, 10:23 AM by
Eric
. 1 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
08-27-2010, 3:12 AM
63690
surrounding
Joined on 07-27-2010
Posts 23
Javascript to set focus
Reply
Quote
I have a javascript to check the input item in the editor, if there is empty, it would set focus on the editor
I tried to use
var txt = document.getElementById('<%= Editor1.ClientID%>');
txt.focus();
or
document.Editor1.focus();
both are not success
08-27-2010, 10:23 AM
63695
in reply to
63690
Eric
Joined on 08-05-2009
Posts 1,269
Re: Javascript to set focus
Reply
Quote
Dear surrounding,
Please try the following code:
function setFocus()
{
// get the cute editor instance
var editor1 = document.getElementById('<%=editor.ClientID%>');
editor1.FocusDocument();
}
You can refer to JavaScript-API.asp which can be found in download package.
thanks for asking
Eric@cutesoft.net