Jump to content


Photo

Pegar menor valor de multiplos combo box

Js Javascript combo box multiplos valor get pegar

  • Faça o login para participar
6 replies to this topic

#1 Emerine

Emerine

    Normal

  • Usuários
  • 79 posts
  • Sexo:Não informado

Posted 19/01/2016, 03:19

Preciso de uma ajuda.

 

eu tenho 5 combo boxs com esses mesmos valores.

<select id="ctl00_PlaceHolderMain_ddlEscopo_DropDownChoice" title="Escopo" class="ms-RadioText">
    <option selected="selected" value="00.Não Informado">00.Não Informado</option>
    <option value="01.Crítico">01.Crítico</option>
    <option value="02.Alto Risco">02.Alto Risco</option>
    <option value="03.Atenção">03.Atenção</option>
    <option value="04.Normal">04.Normal</option>

</select>

eu estou tentando montar um jquery para pegar o menor valor entre esses 5 combo box, sem ser o valor "00"

 

e setar esse menor valor em um sexto campo.

 

vou deixar um jquery q montei, mas ele não esta bom e não funciona direito, e não estou conseguindo achar uma solução para isso.

function ajustaSaude() {
var saude = $('#TDGeral_1 select').val();
var escopo = $('#TDEscopo_1 select').val();
var prazo = $('#TDPrazo_1 select').val();
var risco = $('#TDRisco_1 select').val();
var custo = $('#TDCusto_1 select').val();
var qualidade = $('#TDQualidade_1 select').val();

if (escopo.split('.')[0] < prazo.split('.')[0] && escopo.split('.')[0] != 00) {
if (escopo.split('.')[0] < risco.split('.')[0]) {
if (escopo.split('.')[0] < custo.split('.')[0]) {
if (escopo.split('.')[0] < qualidade.split('.')[0]) {
$('#TDGeral_1 select').val(escopo);
} else {
$('#TDGeral_1 select').val(escopo);
}
} else if (custo.split('.')[0] < qualidade.split('.')[0]) {
$('#TDGeral_1 select').val(custo);
}
} else if (risco.split('.')[0] < custo.split('.')[0] && risco.split('.')[0] != 00) {
if (risco.split('.')[0] < qualidade.split('.')[0]) {
$('#TDGeral_1 select').val(risco);
} else {
$('#TDGeral_1 select').val(risco);
}
}
} else if (prazo.split('.')[0] < risco.split('.')[0] && prazo.split('.')[0] != 00) {
if (prazo.split('.')[0] < custo.split('.')[0]) {
if (prazo.split('.')[0] < qualidade.split('.')[0]) {
$('#TDGeral_1 select').val(prazo);
} else {
$('#TDGeral_1 select').val(prazo);
}
} else if (custo.split('.')[0] < qualidade.split('.')[0]) {
$('#TDGeral_1 select').val(custo);
}
} else if (risco.split('.')[0] < custo.split('.')[0] && risco.split('.')[0] != 00) {
if (risco.split('.')[0] < qualidade.split('.')[0]) {
$('#TDGeral_1 select').val(risco);
} else {
$('#TDGeral_1 select').val(risco);
}
} else if (custo.split('.')[0] < qualidade.split('.')[0] && custo.split('.')[0] != 00) {
$('#TDGeral_1 select').val(custo);
} else if (qualidade.split('.')[0] != 00) {
$('#TDGeral_1 select').val(qualidade);
}
}


#2 Danilomaru

Danilomaru

    Ativo

  • Moderadores
  • 300 posts
  • Sexo:Masculino
  • Localidade:brasil

Posted 23/01/2016, 01:09

function ajustaSaude() {
var saude = parseInt($('#TDGeral_1 select').val().split('.')[0]);
var escopo = parseInt($('#TDEscopo_1 select').val().split('.')[0]);
var prazo = parseInt($('#TDPrazo_1 select').val().split('.')[0]);
var risco = parseInt($('#TDRisco_1 select').val().split('.')[0]);
var custo = parseInt($('#TDCusto_1 select').val().split('.')[0]);
var qualidade = parseInt($('#TDQualidade_1 select').val().split('.')[0]);
            
            var y = [escopo,prazo,risco,custo,qualidade];
            var removeItem = 0;

            y = jQuery.grep(y, function(value) {
             return value != removeItem;
            });
            var m = Math.min.apply(Math,y);
            
            switch(m) {
             case 1:
             $('#TDGeral_1 select').val("01.Crítico");
             break;
             case 2:
             $('#TDGeral_1 select').val("02.Alto Risco");
             break;
             case 3:
             $('#TDGeral_1 select').val("03.Atenção");
             break;
             case 4:
             $('#TDGeral_1 select').val("04.Normal");
             break;
            }             
}


#3 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 22/09/2017, 09:37

Canadian Pharmacy Cialis 40mg cialis Acheter Viagra Generique France
Order Effexor No Prescription Levitra Not Covered Insurance
Viagra Rezeptfrei Belgien <a href=http://cialtobuy.com>cialis</a> Zithromax For Gonorrhea Treatment
Propecia Online Without A Prescription Viagra cialis Best Levitra Generic
Propecia Long Term Comprar Propecia En Espana Cialis 20 Efficace
Nolvadex Homme <a href=http://cialtobuy.com>buy cialis</a> Delayed Side Effects Keflex

#4 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 07/10/2017, 03:20

Onlimne Pharacy Viagra Grenoble Como Usar Viagra viagra Complementaria A Propecia
Cialis 4cpr Riv 10mg Prezzo Cialis Diario Precio viagra Amoxicillin Sudafed 24 Hour Canadian Pharmacy
Overnight Meds Online Rulide pharmacy prices for levitra Viagra Cialis On Line
Generico Kamagra Gelatina Orale generic levitra 20mg India Pharmacy Viagra Cephorum Animal Tablets For Sale

#5 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 07/10/2017, 09:16

Amoxicillin With Alcohol viagra Amoxil Dosage For Children
Laxa Tea Prescription Viagra Online Bentyl Find No Prior Script viagra Achat Cialis Cheque
Branded Cialis Mail Order Where Can I Buy Online Fluoxetine Without Rx Cialis 20mg Effets Secondaires viagra prescription Propecia Generique Pharmacie Acheter
Top Canadian Pharma Companies viagra online pharmacy Md Price Pharmacy Discounts

#6 JeffMalm

JeffMalm

    Super Veterano

  • Usuários
  • 12254 posts
  • Sexo:Feminino
  • Localidade:Mount Carey

Posted 08/10/2022, 18:22

Mesterolone is another chemical with dubious claims on the market as Proviron bumex to lasix Finally, CYP2D6 53 was determined to be an extreme outlier and excluded from this analysis because it had a 28 fold increase in in vitro function compared to reference

#7 JeffMalm

JeffMalm

    Super Veterano

  • Usuários
  • 12254 posts
  • Sexo:Feminino
  • Localidade:Mount Carey

Posted 10/02/2023, 13:33

buying cialis online reviews Isiah ZFTzBLckIN 6 17 2022
No price talk here please can you buy cialis online
A total of 222 patients were enrolled between July 2006 and July 2008 and randomly assigned to receive leuprorelin for either 2 years N 112 or 3 or more years N 110 lasix vs bumex My experience of some NHS clinics is that the doses used can be quite standardised not tailored to the patient and not flexed during treatment leading to some cases of OHSS and some cases of fairly low numbers of eggs recovered even in patients who could expect a higher response on an higher dose
Placebo Sitagliptin 100 mg once daily Metformin HCl 500 mg twice daily Metformin HCl 1000 mg twice daily Sitagliptin 50 mg twice daily Metformin HCl 500 mg twice daily Sitagliptin 50 mg twice daily Metformin HCl 1000 mg twice daily A1C N 165 N 175 N 178 N 177 N 183 N 178 Baseline mean 8 ivermectin dosage for humans To find out if IVF is right for you, reach out to our fertility team online, or call 818 946- 8051 to schedule a consultation





Veja alguns posts relacionados com: Js, Javascript, combo box, multiplos, valor, get, pegar

1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq