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

254
Views
how to retrieve the value of a radio button

I have an order form with different delivery methods. I would like if we select shipments by Belgian post that the var Delivery is equal to 2 that when we choose mondial relay belgique that the var Delivery is equal to 3 that when we choose France post that the delivery var is equal to 4. that when we choose mondial relay france that the delivery var is equal to 5. I tried the code below but it does not work

<div>
<input type="radio" id="mondial_relay_belgique" name="envois" value="2"  >
<label for="mondial_relay_belgique">Envois par mondial relay belgique 5 euros</label>
</div>
<div>
<input type="radio" id="poste_belgique" name="envois" value="3" >
<label for="poste_belgique">envois par poste belgique 4 euros</label>
</div>
<div>
<input type="radio" id="mondial_relay_france" name="envois" value="4" checked="checked" >
<label for="mondial_relay_france">Envois par mondial relay france 3 euros</label>
</div>
<div>
<input type="radio" id="poste_france" name="envois" value="5" >
<label for="poste_france">envois par poste france 2 euros</label>
</div>
if (document.getElementById('poste_belgique').checked) {
var Livraison=2;
}
if(document.getElementById("mondial_relay_belgique").checked) {
var Livraison=3;
}
else if(document.getElementById('poste_france').checked) {
 var Livraison=4;
}
else if(document.getElementById('mondial_relay_france').checked) {
var Livraison=5;
}
about 4 years ago · Juan Pablo Isaza
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!