0
<script type="text/javascript" language="javascript">
$(document).ready(function() {
    $("#progressbar").progressbar({
        value: 0
    });
    $("#btnGetData").click(function() {
        updateProgress();
        var intervalID = setInterval(updateProgress, 5000);
        $("#progressbar").progressbar({
            value: 0
        });
        $("#result").text(' ');
        $.ajax({
            type: "POST",
            url: "ListaInformes.aspx/GetText",
            data: "{fechain: '" + $('#txtFechaInicio').val() + "', fechafin: '" + $('#txtFechaFin').val() + "', tiporeporte: '" + $('#DDLTipoInforme').val() + "', segmento:'" + $('#DDLSegmento').val() + "', categoria:'" + $("#<%=ddlCategorias.ClientID%>").val() + "', area:'" + $("#<%=ddlarea.ClientID %>").val() + "', idusuario:'<%=Session("
            IdUsuario ") %>', tipofecha: '" + $('#RBL_TipoFecha input:checked').val() + "',regional:'" + $("#<% = CheckBoxRegional.ClientID %> input:checkbox[checked=true]").serializeArray() + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            async: true,
            success: function(msg) {
                $("#progressbar").progressbar("value", 100);
                $("#result").html(msg.d);
                clearInterval(intervalID);
            }
        });
        return false;
    });
});

function updateProgress() {
    var value = $("#progressbar").progressbar("option", "value");
    if (value < 100) {
        $("#progressbar").progressbar("value", value + 1);
    }
}​
</script>

我正在使用 JSON、jQuery 和 ASP.net 创建一个由数据库填充的复选框列表类型控件。问题是我创建了一个选择器来知道它们是否被选中并且还知道该值。

我需要你在该区域存储变量检查资产及其值?到目前为止,只告诉我哪些是活跃的,而不是它的价值。

申请如下:

选择器 jquery 复选框列表

<div id="main">
  <table width="100%">
    <tr id="tr_fechausuario" runat="server" align="left">
      <td colspan="2">
        <table width="100%">
          <tr>
            <td width="50%">Fecha de Inicio&nbsp;&nbsp;&nbsp;
              <asp:TextBox ID="txtFechaInicio" runat="server"
              CssClass="textbox"></asp:TextBox>
            </td>
            <td width="50%">Fecha de Fin&nbsp;&nbsp;&nbsp;
              <asp:TextBox ID="txtFechaFin" runat="server"
              CssClass="textbox"></asp:TextBox>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr id="tr2" runat="server" align="left">
      <td colspan="2">&nbsp;</td>
    </tr>
    <tr id="tr1" runat="server" align="left">
      <td class="style3">Seleccione el tipo de consulta</td>
      <td class="style1">
        <asp:RadioButtonList ID="RBL_TipoInforme" runat="server" CssClass="textbox"
        AutoPostBack="True">
          <asp:ListItem Value="0">Informe de Casos</asp:ListItem>
          <asp:ListItem Value="1">Informe Histórico</asp:ListItem>
        </asp:RadioButtonList>
      </td>
    </tr>
    <tr id="spacer1" runat="server" align="left">
      <td colspan="2" class="style6"></td>
    </tr>
    <tr id="tr_spacer" runat="server" align="left">
      <td class="style7">Seleccione el criterio de las fechas</td>
      <td>
        <asp:RadioButtonList ID="RBL_TipoFecha" runat="server">
          <asp:ListItem Selected="True" Value="1">Fecha de Creación</asp:ListItem>
          <asp:ListItem Value="2">Fecha de Vencimiento</asp:ListItem>
          <asp:ListItem Value="3">Fecha de Solución</asp:ListItem>
        </asp:RadioButtonList>
      </td>
    </tr>
    <tr id="spacer2" runat="server" align="left" visible="True">
      <td class="style5">&nbsp;</td>
      <td class="style5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </tr>
    <tr id="tr_tipoinforme" runat="server" align="left" visible="False">
      <td class="style8">Seleccione el tipo de informe</td>
      <td class="style2">
        <asp:DropDownList ID="DDLTipoInforme" runat="server" AutoPostBack="True"
        DataSourceID="SQLDS_Informes" DataTextField="iet_NombreInforme" DataValueField="iet_TipoInforme"
        Enabled="False" CssClass="textbox" Height="20px" Width="548px"></asp:DropDownList>
        <asp:SqlDataSource ID="SQLDS_Informes" runat="server"
        ConnectionString="<%$ ConnectionStrings:bdcmp_EcopetrolCRMConnectionString %>"
        SelectCommand="eco_spInformeEstadisticaConsulta" SelectCommandType="StoredProcedure">
          <SelectParameters>
            <asp:Parameter DefaultValue="2" Name="Donde_1" Type="Int32" />
            <asp:SessionParameter DefaultValue="96" Name="IdUsuario_2" SessionField="IdUsuario"
            Type="Int32" />
            <asp:Parameter DefaultValue="0" Name="TipoInforme_3" Type="Int32" />
          </SelectParameters>
        </asp:SqlDataSource>
      </td>
    </tr>
    <tr id="spacer3" runat="server" align="left" visible="True">
      <td class="style4" colspan="2">&nbsp;</td>
    </tr>
    <tr id="tr_segmento" runat="server" align="left" visible="false">
      <td class="style7">Seleccione el segmento</td>
      <td>
        <asp:DropDownList ID="DDLSegmento" runat="server" Width="200px" CssClass="textbox"
        AutoPostBack="True"></asp:DropDownList>
      </td>
    </tr>
    <tr id="Tr3" runat="server" align="left" visible="True">
      <td class="style4" colspan="2">&nbsp;</td>
    </tr>
    <%-- Se añade nuevo campos regional--%>
      <tr id="tr_regional" runat="server" visible="False">
        <td>Selecciones la Regional</td>
        <td>
          <asp:CheckBoxList ID="CheckBoxRegional" runat="server" Font-Size="X-Small"></asp:CheckBoxList>
          <asp:DropDownList ID="DDLRegional" runat="server" Visible="False"></asp:DropDownList>
        </td>
      </tr>
      <tr id="Tr7">
        <td></td>
        <td></td>
      </tr>
      <tr id="tr_Categorias" runat="server" align="left" visible="false">
        <td class="style7">Seleccione la Categoria</td>
        <td>
          <asp:DropDownList ID="ddlCategorias" runat="server" CssClass="textbox"
          Width="200px" ToolTip="Seleccione la Categoria"></asp:DropDownList>&nbsp;
          <asp:RequiredFieldValidator ID="Rv_Categoria"
          runat="server" ControlToValidate="ddlCategorias" Display="Dynamic" ErrorMessage="*"
          InitialValue="0" SetFocusOnError="True" Visible="False"></asp:RequiredFieldValidator>
        </td>
      </tr>
      <tr id="Tr4" runat="server" align="left" visible="True">
        <td class="style4" colspan="2">&nbsp;</td>
      </tr>
      <tr id="tr_Area" runat="server" align="left" visible="false">
        <td class="style7">Seleccione el Area</td>
        <td>
          <asp:DropDownList ID="ddlarea" runat="server" Width="200px" CssClass="textbox"
          AutoPostBack="False"></asp:DropDownList>
        </td>
      </tr>
      <tr>
        <td></td>
        <td></td>
      </tr>
  </table>
  <br />
  <div id="progressbar"></div>
  <div id="result"></div>
  <br />
  <center>
    <asp:Button ID="btnGetData" runat="server" Text="Generar Informe" CssClass="button"
    ForeColor="#336699" Enabled="false" />
  </center>
</div>
4

0 回答 0