Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
How to get the check value in jquery?

How to get the value to know if the checkbox is selected?

I'm trying the following code: (HTML)

  <div class="col-md-9" style=" padding-left: 46px; padding-top: 6px;">
       <label class="checkbox checkbox-inline">
          <input type="checkbox" id="sequenciaRelatorio">
          <i class="input-helper"></i>
          Ordenar por Seq. de Categoria
          </label>
  </div>

Within my js function I put:

 var ordenacaoRelatorio = $("input[type='checkbox']").val();

 var routeValues = "pdfExcel=0" + '?rbCampanha=' + rbCampanha + '?rbTabelaPreco=' + rbTabelaPreco +
    '?rbAtivos=' + rbAtivos + '?rbInativos=' + rbInativos + '?rdRetratoPaisagem=' + rdRetratoPaisagem + '?rdOrdenacaoRel=' + rdOrdenacaoRel +
    '?rdAgrupamentoRel=' + rdAgrupamentoRel + '?idsTabelaPreco=' + _idsTabelaPreco + '?posicoesTabelasPreco=' + _posicoesTabelasPreco +
    '?rdImagemRel=' + rdImagemRel + '?rdProdutosSaldoEstoqueFiltro=' + rdProdutosSaldoEstoqueFiltro + '?rdProdutosComSaldoEstoque=' + rdProdutosComSaldoEstoque + '?bCompacto=' + bCompacto + '?sequenciaRelatorio=' + ordenacaoRelatorio;
$.ajax({
    url: '/Sistema/Base/EncodeRoute',
    data: {
        actionName: "RelatorioTabelasPrecoCatalogo",
       ordenacaoRelatorio: ordenacaoRelatorio
    },
    success: function (result) {
        if (result.bServidorFuncionandoRotativa == true) {
            if (result.url !== "") {
                window.open(result.url);

            }

        }

    },
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

put this code in your js, .change() function will execute when you checked the checkbox.

 $("#sequenciaRelatorio").change(function() { // this code will execute whenever user change the checkbox
        if(this.checked) { // if its response is 1 markes as checked
            alert('checked');
            $("#sequenciaRelatorio").val('1');
        }else{
            $("#sequenciaRelatorio").val('0');
        }
    });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!