Welcome Guest Search | Active Topics | Sign In | Register

Call post back event of button on close event of spell checker Options
James Shamas
Posted: Monday, March 8, 2010 9:21:02 AM
Rank: Newbie
Groups: Member

Joined: 3/3/2010
Posts: 3


We have two buttons which have the functionality of submitting the data. We need to do a spell check before submitting the data on server for now we have called spellchecker on the client click event of the button .We have to submit the data or call a postback event of that button whenever spell check is complete.



But currently issue is we have to click the button again (after the Spell check is complete) to do a post back and save the actual data.

eo_support
Posted: Monday, March 8, 2010 11:01:55 AM
Rank: Administration
Groups: Administration

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

I believe you can handle the SpellChecker's ClientSideOnMessage and check for "no_error" messsage name. If you see that message, then the SpellChecker is done and you can continue your post back.

The code will be something like this:

Code: JavaScript
function spellchecker_msg_handler(control, name, message, type, args)
{
    if (name == "no_error")
    {
        //Use a timer to trigger the post back code to allow
        //spell checker to finish clean up
        setTimeout(function()
        {
            //Trigger post back
        }, 10);
    }
}


Code: HTML/ASPX
<eo:SpellChecker ClientSideOnMessage="spellchecker_msg_handler" ...>
....
</eo:SpellChecker>


Thanks!
James Shamas
Posted: Wednesday, March 10, 2010 8:41:24 AM
Rank: Newbie
Groups: Member

Joined: 3/3/2010
Posts: 3
I have handlled SpellChecker's ClientSideOnMessage and call a post back event. Actualy,we are passing the list of controls to the controls to check property of SpellChecker but it doesnt get post back from all the controls once the spell check is done.To do a post back again i need to click on submit button.
eo_support
Posted: Wednesday, March 10, 2010 9:00:50 AM
Rank: Administration
Groups: Administration

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

That would depend on how you do the post back. We are not aware how the SpellChecker would affect your post back code. If you can provide a test page we will be happy to take a look.

We also have a ScriptEvent control that is specifically designed for you to do post back from JavaScript. So you can give that a try. To use the ScriptEvent control, you would put the control in your form, then call something like this in your JavaScript to trigger the post back:

Code: JavaScript
eo_GetObject("ScriptEvent1").trigger("whatever", "anything");


This would trigger the ScriptEvent control's server side Command event. The two arguments you passed in are carried to the server side as CommandName and CommandArgument of your Command event argument. You would then perform your server side action inside the Command event handler instead of your Submit Button's Click handler.

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.