Welcome Guest Search | Active Topics | Sign In | Register

User loses cursor after Callback Panel executes Options
Mike T
Posted: Sunday, June 13, 2010 8:52:56 PM
Rank: Member
Groups: Member

Joined: 7/28/2008
Posts: 25
I have several Callback panels on a asp page.

Here is what is happening in one of them

If InStr(Me.oa_ssn.Text, "#", CompareMethod.Text) > 0 Then

Else
Dim theValue As String = StripSsn(Me.oa_ssn.Text)
Session("theValue1") = theValue
Me.oa_ssn.Text = "#######" & Right(theValue, 4)

End If

When this execute completes I am trying to get the cursor to proceed to the next text box in the form without the user having to hit the tab key.

I tried adding line of code

Me.oa_dl.Focus()

I also tried putting that same code in

Protected Sub oa_ssn_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles oa_ssn.TextChanged
Me.oa_dl.Focus()
End Sub


Please advise
eo_support
Posted: Monday, June 14, 2010 9:41:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

This is normal. Code related to "Focus" is rendered outside of the CallbackPanel so it won't work. You can try to manually using rendering JavaScript code inside the CallbackPanel (a single way is put a Label inside your CallbackPanel and then set that Label's Text to "<script type='text/javascript'>whatever_you_want_to_call();</script>").

You can also try ASP.NET AJAX UpdatePanel if your application already uses AJAX. Our CallbackPanel and MS's UpdatePanel works very much the same way but UpdatePanel is from MS, so obviously MS has more control over how they work together and it has a much larger user base.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.