Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0multiview textbox focusmultiview textbox focus
Previous
 
Next
New Post
11/14/2007 7:46 PM
 

Hi,

 

For focusing on textbox I use code:

 

If DotNetNuke.UI.Utilities.ClientAPI.ClientAPIDisabled = False Then

            DotNetNuke.UI.Utilities.ClientAPI.RegisterClientReference(TextBox2.Page, DotNetNuke.UI.Utilities.ClientAPI.ClientNamespaceReferences.dnn)

            DotNetNuke.UI.Utilities.DNNClientAPI.AddBodyOnloadEventHandler(TextBox2.Page, "__dnn_SetInitialFocus('" & TextBox2.ClientID & "');")

        End If

 

But, when I use textbox in multiview, focus does not work. Any ideas?

 

Thanks!

 
New Post
11/16/2007 4:44 PM
 

I found the problem is that I use AJAX module and that the solution for this problem is AJAX timer. But when I try to use Tick event and next code:

Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)

        DotNetNuke.UI.Utilities.ClientAPI.RegisterClientReference(TextBox2.Page, DotNetNuke.UI.Utilities.ClientAPI.ClientNamespaceReferences.dnn)

        DotNetNuke.UI.Utilities.DNNClientAPI.AddBodyOnloadEventHandler(TextBox2.Page, "__dnn_SetInitialFocus('" & TextBox2.ClientID & "');")

    End Sub

focus does not work.

Anyone had a similar problem?

 
New Post
11/16/2007 5:17 PM
 

Although I've never tried it in a MultiView, I would think that the following core method would work (usually in Page_Load):

Dim tb2 As System.Web.UI.Control = myMultiView.FindControl("TextBox2")
If Not tb2 Is Nothing Then DotNetNuke.Common.SetFormFocus(tb2)

Where myMultiView is your MultiView control object and "TextBox2" is the ID of the textbox.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
11/16/2007 5:43 PM
 

Thanks for reply, but I found that problem is in AJAX module ("supports partial rendering" was enabled in module settings). Focus work on multiview when I uncheck this option. I made module with textbox and use: DotNetNuke.Common.Globals.SetFormFocus(TextBox2), when I uncheck "supports partial rendering" it works fine, but when this option is enabled, it's not working. Any idea how to make focus work on AJAX module?

 

Thanks

 
New Post
8/9/2008 9:45 AM
 

I'm having similar issues with SetformFocus not working for me in my ajax modules.


I'm too poor for anything other than the community version
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0multiview textbox focusmultiview textbox focus


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out