May 07, 2010, 3:01 PM
[CLOSED] [1.0] Issue with success property on direct event of textfield
Hi,
We have a page in our site where there is a DirectEvent attached to on the change of a TextField. When this is used the page renders a <raw> tag inside the javascript response causing the page to throw a js error.
Here is a sample page and a sample result from the dynamic js of that page
Thanks!
***RESPONSE***
Ext.onReady(function(){Ext.QuickTips.init();new Ext.form.TextField({
id: "txtGroupName",
cls: "Required",
disabled: true,
renderTo: "txtGroupName_Container",
width: 425,
autoCreate: {"tag":"input","type":"text","maxlength":100,"autocomplete":"off"},
allowBlank: false,
maxLength: 100,
directEvents: {
change: {fn:function(el,newValue,oldValue){var params=arguments;Ext.net.DirectEvent.confirmRequest({
formProxyArg: "form1",
userSuccess: function(response, result, el, type, action, extraParams){<raw>Ext.get('ctl00_Content_btnSaveGroup').dom.disabled=false;},
control:this,action:'Change'});},delay:20}
}
<%@ Page Language="C#" EnableEventValidation="false" %></p>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
<title>Example of disappearing checkbox</title>
</head></p>
<script runat="server">
protected void txtGroupName_Changed(object sender, DirectEventArgs e)
{</p>
}
protected void btnSaveGroup_Click(object sender, EventArgs e)
{</p>
}</p>
</script></p>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" ID="extResourceManager" SourceFormatting="true">
</ext:ResourceManager>
<ext:TextField ID="txtGroupName" runat="server"
AllowBlank="false"
Width="425"
MaxLength="100"
Cls="Required"
Disabled="true"
SkinID="RequiredTextBox">
<DirectEvents>
<Change OnEvent="txtGroupName_Changed" Success="Ext.get('ctl00_Content_btnSaveGroup').dom.disabled=false;" />
</DirectEvents>
</ext:TextField>
<asp:Button ID="btnSaveGroup" runat="server" Text="Save Changes" onclick="btnSaveGroup_Click" Enabled="false" />
</form>
</body>
</html>
</p>