This is a migrated thread and some comments may be shown as answers.

Loss of focus on page load

1 Answer 49 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 19 Dec 2011, 12:41 PM
Hi,

I wasn't sure whether it's better to start a new thread, or reawaken this one: http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-steals-focus.aspx .
 
I have the same situation which has been described above - when my page loads, the Rad Editor 'steals' focus from the initial control, as soon as it has fully loaded. The problem I have is that the RAD Editor is on a WSS 3.0 installation, and is being used on the 'NewForm.aspx' page for numerous lists right across the site. On each of the different NewForm.aspx pages, the first control (textbox) has a different ID (which I believe is automatically assigned by WSS), so for example on one list the NewForm.aspx might have an ID of "ctl00_m_g_40354816_d967_4093_b621_7161bc04baef_ctl00_ctl04_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField", whereas on another list the ID might be" ctl00_m_g_96dd9dd2_583f_4d27_948d_ce9258d4b232_ctl00_ctl04_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField".

Now I recognised that I could edit the IDs on each of the various NewForm.aspx files, but there are a large number of them, across a large number of sites and lists across an entire intranet. Ideally I'd like to be able to simply make a config change to the RAD Editor itself (to prevent the iFrame stealing the focus). Or perhaps make a change to the shared MasterPage - thereby allowing me to apply the change site wide, without requiring me to edit hundreds of aspx pages.

Can anyone on here think of a clever solution, the only thing I can think to try is to use script to try and find the first control/textbox within the "ms-formtable", but I'm worried that this might lead to performance issues.

Any thoughts?

Thanks in advance,

Rob

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Dec 2011, 10:02 AM
Hi,

Your idea of writing a script that will find the first control/textbox within the "ms-formtable" is good and you should not experience performance problems with it.
If you work with RadEditor for SharePoint 6.x.x, you should know that it includes the jQuery JavaScript library, which you can use to find with less code the first control/textbox on the page.


All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
Robert
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or