Rank: Advanced Member Groups: Member
Joined: 1/9/2009 Posts: 97
|
Hello Im using the Spellchecker with s aSave Button. I have added the code as suggested in previous post i found wihc allows the Postback just fine. However if i misspell a word and click Change it changes the word in the ASP Panel if i click on my save button (which replaced the close button) it postback but the change is never made. is there a way to access the Text in the Spellchecker dialog Panel? my sample code
Code: HTML/ASPX
<script type="text/javascript">
function msg_handler(ctrl, msgName)
{
//Get the JavaScript code that can be used to simulate Save button click
var postBackJS = "<%= GetPostBackEventReference(spCheckerWindow.ContentContainer.FindControl("btnFinish"))%>";
if (msgName == "no_error")
eval(postBackJS);
}
</script>
<eo:SpellChecker ID="spChecker" runat="server" DialogID="spCheckerWindow"
StartButton="btnSave" ControlToCheck="txtComments" ClientSideOnMessage="msg_handler">
</eo:SpellChecker>
<eo:SpellCheckerDialog ID="spCheckerWindow" runat="server" AllowResize="True"
CloseButtonUrl="" ControlSkinID="None" HeaderHtml="Spell Check"
HeaderHtmlFormat="<div style="padding-top:4px">{0}</div>"
HeaderImageHeight="27" HeaderImageUrl="00020441" Height="216px" MinHeight="100"
MinWidth="150" Width="320px">
<HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;" />
<BorderImages BottomBorder="00020409,00020429"
BottomLeftCorner="00020408,00020428" BottomRightCorner="00020410,00020430"
LeftBorder="00020406,00020426" RightBorder="00020407,00020427"
TopBorder="00020402,00020422" TopLeftCorner="00020401,00020421"
TopLeftCornerBottom="00020404,00020424" TopRightCorner="00020403,00020423"
TopRightCornerBottom="00020405,00020425" />
<FooterStyleActive CssText="background-color:#f0f0f0; padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
<ContentTemplate>
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td colSpan="3">
Content:
</td>
</tr>
<tr>
<td colSpan="2" vAlign="top" width="330">
<asp:Panel ID="TextPanel" runat="server"
style="border-right: gray 1px solid; border-top: gray 1px solid; border-left: gray 1px solid; width: 330px; border-bottom: gray 1px solid; height: 150px">
</asp:Panel>
</td>
<td vAlign="top">
<asp:Button ID="IgnoreOnceButton" runat="server" Text="Ignore Once"
Width="120px" />
<p>
<asp:Button ID="IgnoreAllButton" runat="server" Text="Ignore All"
Width="120px" />
</p>
<p>
<asp:Button ID="AddCustomButton" runat="server" Text="Add to Dictionary"
Width="120px" />
</p>
</td>
</tr>
<tr>
<td colSpan="3">
Suggestions:
</td>
</tr>
<tr>
<td colSpan="2" vAlign="top" width="330">
<asp:Panel ID="SuggestionPanel" runat="server"
style="border-right: gray 1px solid; border-top: gray 1px solid; border-left: gray 1px solid; width: 330px; border-bottom: gray 1px solid; height: 100px">
</asp:Panel>
</td>
<td vAlign="top">
<asp:Button ID="ChangeButton" runat="server" Text="Change" Width="120px" />
<p>
<asp:Button ID="ChangeAllButton" runat="server" Text="Change All"
Width="120px" />
</p>
</td>
</tr>
<tr>
<td noWrap>
Change to:
</td>
<td align="right">
<asp:TextBox ID="ChangeToText" runat="server" style="width:220px"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td align="right" colSpan="3">
<asp:Button ID="btnFinish" runat="server" onclick="btnSave_OnClick" OnClientClick="eo_GetObject("spCheckerWindow").close();" Text="Finish" Width="120px" />
</td>
</tr>
</table>
</ContentTemplate>
<ContentStyleActive CssText="background-color:#f0f0f0;font-family:tahoma;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px" />
</eo:SpellCheckerDialog>
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I am not sure which change you want to save. If you are talking about txtComments, then it should be saved correctly because its content has already been changed.
Thanks!
|