.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Problem with focus in fckeditor

Posted By: sriram     Posted Date: November 06, 2009    Points:2   Category :ASP.Net
Hi,
I'm using FckEditor 2.6.4 as follows:

%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<table>
<tr>
<td>
<FCKeditorV2:FCKeditor ID="txtareaDetailedDes" BasePath="~/FCKeditor/fckeditor/"
runat="server" Width="500px" Height="250px" FontNames="Arial;Calibri;Times New Roman">
</FCKeditorV2:FCKeditor>
</td>
<td valign="top">
<asp:TextBox runat="server" ID="txtDetailedDesc" Width="0" BackColor="white" BorderStyle="None"
ForeColor="white"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvDetailedDes" runat="server" ValidationGroup="Submit"
SetFocusOnError="true" ControlToValidate="txtareaDetailedDes" Display="None"
ErrorMessage="Please Enter some text in Editor"></asp:RequiredFieldValidator>
<ajaxToolkit:ValidatorCalloutExtender ID="vceDetailedDes" runat="server" TargetControlID="rfvDetailedDes"
CssClass="CustomValidator">
</ajaxToolkit:ValidatorCalloutExtender>
</td>
</tr>
</table>
<br />
<asp:Button ID="btnSubmit" Text="Submit" runat="server" ValidationGroup="Submit" />
</asp:Content>


when clicking on submit button required field validation is fired, but im not able to get focus on to the editor. i need to get focus i.e. control should go to that editor when validation is fired.

because in my actual application im having lot of controls and vertically screen is scrolled, so when user clicks on submit button, even validation is fired, user not able to find that validation, since editor control is at upper position, unless user scrolls up, he is not able to see the calloutextender.

please give me the solution for this. ultimately when validation is fired, user should be able to find callout extender without scroll up or down, i.e. focus should go to that editor control automatically.

Responses
Author: Dilip             
Posted Date: March 30, 2010     Points: 5   

http://sandblogaspnet.blogspot.com/2009/04/hideshow-validator-callout-control.html

Checkout this link..I think you can use the javascript used in this to impelement the focus stuff

Regards
Dilip


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend