Click here to Skip to main content
15,886,362 members

Comments by alex_78 (Top 2 by date)

alex_78 8-Apr-14 9:17am View    
i just still have the problem with the parameter in the javascript. I don't know how to declare the function.
alex_78 8-Apr-14 5:04am View    
I have this file RetrievalMask.aspx which is the site with the button. It is the search Button which is disabled.



<pre lang="xml"><%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RetrievalMask.aspx.cs" Inherits="Retrieval.RetrievalMask" %>

<%@ Register assembly="DevExpress.Web.v13.2, Version=13.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<title></title>

<script type="text/javascript">
function ValidateButton()
{

}
</script>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="dropDown">
<asp:DropDownList runat="server" ID="dropDown" ItemType="Retrieval.RetrievalMask" SelectMethod="FillDropDown" Width="400px" OnSelectedIndexChanged="dropDown_SelectedIndexChanged" AutoPostBack="true" >
</asp:DropDownList>
</div>
<br />
<asp:Panel id="searchMask" runat="server"></asp:Panel>
<br />
<div>
<asp:Button ID="cancel" runat="server" Text="cancel" Visible="false"/>
<asp:Button ID="search" runat="server" Text="search" OnClick="search_Click"/>
</div>
<br />
<div>
<span id="message" runat="server" visible="false">No documents found</span>
</div>
</asp:Content></pre>

--------------------------------------------------
here is the class where i create the textbox. It is in the function SetSearchFieldProperties()


private void SetSearchFieldProperties(ref Control c, RetrievalFieldClass rf)
{
try
{
if (c is TextBox)
{
((TextBox)c).Attributes.Add("runat", "server");
((TextBox)c).Width = 155;
((TextBox)c).TextChanged += new EventHandler(textBox_TextChanged);
((TextBox)c).AutoPostBack = true; // ????
((TextBox)c).Attributes.Add("onclick", "ValidateButton(this.id);");
}
else
{
if (c is DropDownList)
{
((DropDownList)c).Width = 160;
((DropDownList)c).SelectedIndexChanged += new EventHandler(dropDownLookUp_SelectedIndexChanged);
//((DropDownList)c).AutoPostBack = true;
((DropDownList)c).Items.Clear();

((DropDownList)c).Items.Add("");
foreach (string str in rf._lookUpList.Values) //set the lookup longname values in the DropDownList
((DropDownList)c).Items.Add(str);
}