View Full Version : [CLOSED] RemoteValidation with ExtraParams not work

Apr 02, 2014, 3:30 AM
In following example I add a ExtraParams in RemoteValidation, but it makes the page cannot show.
It seems have some javascript error. Is it a bug or I do some thing wrong?
I have tried if I change the mode of ExtraParams to value then the page is shown, but not work for raw.

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void vali_txtName(object sender, RemoteValidationEventArgs e)
e.Success = false;
e.ErrorMessage = "invalid";


<!DOCTYPE html>

<head id="Head1" runat="server">
<form id="Form1" runat="server">
<ext:ResourceManager runat="server" />
<ext:TextField runat="server" ID="txtName" IsRemoteValidation="true" MaxLength="50" EnforceMaxLength="true" Text="Some text here">
<RemoteValidation OnValidation="vali_txtName">
<ext:Parameter Name="Values" Value="#{txtName2}.getValue()" Mode="Raw" />

<ext:TextField runat="server" ID="txtName2" MaxLength="50" EnforceMaxLength="true" Text="Some text here" />

Apr 02, 2014, 4:30 PM
Hi @trePjt,

The second TextFied is not rendered by the time the RemoteValidation section is being built in JavaScript.

You can use the following instead of the ExtraParams section.

<RemoteValidation OnValidation="vali_txtName" Before="o.extraParams.Values = #{txtName2}.getValue();">

Apr 03, 2014, 1:26 AM
It's work. Thank you.