|
Rank: Advanced Member Groups: Member
Joined: 6/9/2007 Posts: 98
|
Hi,
I have question to your spellchecker. When i dont define a ControlToCheck, than i become an Error that i must define it or set text to check as parameter by call the check method in javascript. Can i call the check function from my script?
Kind regards Philipp
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I believe you can call start with the TextBox's ClientID of the DOM element directly. For example:
spellChecker.start("TextBox1");
or
spellChecker.start(document.getElementById("TextBox1"));
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2007 Posts: 98
|
Hi, I have test this, but i become an exception. Here's a sample page:
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EODebug.aspx.cs" Inherits="DemoApp.EODebug" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:SpellCheckerDialog ID="SpellCheckerDialog1" runat="server"
AllowResize="True" CloseButtonUrl="00020440" ControlSkinID="None"
HeaderHtml="Dialog Title"
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;" />
<ContentStyleActive CssText="background-color:#f0f0f0;font-family:tahoma;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px" />
<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="CloseButton" runat="server" Text="Close" Width="120px" />
</td>
</tr>
</table>
</ContentTemplate>
<FooterStyleActive CssText="background-color:#f0f0f0; padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
<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" />
</eo:SpellCheckerDialog>
<eo:SpellChecker ID="SpellChecker1" runat="server"
ControlToCheck="" DialogID="SpellCheckerDialog1"
Language="de_DE">
</eo:SpellChecker>
<input id="Button1" type="button" value="button" onclick="startSpellchecker();" />
<input type="text" id="xxx" />
</div>
</form>
</body>
</html>
Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DemoApp
{
public partial class EODebug : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string script = "<script type=\"text/javascript\">\n" +
"function startSpellchecker() {\n" +
" alert(document.getElementById(\"xxx\").value);\n" +
" eo_GetObject('" + this.SpellChecker1.ClientID + "').start(document.getElementById(\"xxx\"));\n" +
"}\n" +
"</script>\n";
SpellChecker1.ControlToCheck = "";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Spellchecker", script);
}
}
}
Errormessage: Than i have a question. Can i post HTML Code to check?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Please download 8.0.44 from our download page. That build should fix this problem.
Thanks!
|
|