Knowledgebase Home Page  >  RapidSpell Web ASP.NET  >  Troubleshooting
Search the Knowledge Base
ASP.NET AJAX + RapidSpellWebLauncher + PostBackOnFinish + Firefox causes a Javascript error on postback. (C#, VB.NET)
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=168&catId=58

Options

Print this page
Email this to a friend
If you have an ASP.NET AJAX update panel containing a RapidSpellWebLauncher, and have set PostBackOnFinish=true in RapidSpellWebLauncher, the page will have a JS error in Firefox when the spell checker finishes.  This is related to a bug in Firefox that is aggravated by doing any AJAX update when the Javascript that called for the postback is in a different window (eg. the spell checker popup).
 
As a workaround.
 
1. Add this script to your page
 
<script type='text/javascript'>
 
function RapidSpellWebLauncher1_Finish_CS(){
setTimeout("<%= Page.ClientScript.GetPostBackEventReference(RapidSpellWebLauncher1, false) %>", 1);
}
</script>
 
2. Set PostBackOnFinish to false, to disable the automatic postback.
 
3. Add
 
FinishedListener="RapidSpellWebLauncher1_Finish_CS"
 
to the RapidSpellWebLauncher tag, this will call the Javascript when the spell checker finishes, which will in turn do the postback via a timeout (the timeout makes the Javascript originate from the main window, which avoids the Firefox issue).
4. Handle the Finish postback event on the server as before, eg.
 
C#
 
Add

OnFinish="RapidSpellWebLauncher1_Finish"

to the RapidSpellWebLauncher tag, and add this method to the code behind

protected void RapidSpellWebLauncher1_Finish(object sender, EventArgs e)

{

....

}

 

VB.NET

Add this method to the code-behind

Protected Sub RapidSpellWebLauncher1_Finish(ByVal sender As Object, ByVal e As System.EventArgs) Handles RapidSpellWebLauncher1.Finish

....

End Sub

 

 


Related Questions:

Attachments:

No attachments were found.