Note that there are some explanatory texts on larger screens.

plurals
  1. POhow can we change the value by using radio buttons
    text
    copied!<p>I am making a website in Adobe Dreamweaver with php. In the site there’s a 3 buttons for selecting payment method that will act as the continue button. What I want is when the user checks a radio buttons (I agree button), it will be add with that amount and display with previous amount.. there is three buttons which has the corresponding values(amount in pounds)..</p> <p>plz check my website <a href="http://www.spsmobile.co.uk" rel="nofollow">http://www.spsmobile.co.uk</a> in this linkgo to mobile phone unlocking and after add the cart click make payment it will go to next page there is a delivery mail details.. for that delivery mail details only am asking.. here i mentioned code:</p> <pre><code>&lt;input id="radio-1" type="radio" name="rmr" value="1"&gt; &lt;label for="radio-1"&gt;£3&lt;/label&gt; &lt;input id="radio-2" type="radio" name="rmr" value="2"&gt; &lt;label for="radio-2"&gt;£5.5&lt;/label&gt; &lt;input id="radio-3" type="radio" name="rmr" value="4"&gt; &lt;label for="radio-3"&gt;£10&lt;/label&gt; &lt;div class="total-text" style="font-size:36px"&gt;£10&lt;/div&gt; var total = parseInt($("div.total-text").text().substring(1), 10); $("input[name='rmr']").bind('change', function() { var amount = 0; switch (this.value) { case "1": amount = 3; break; case "2": amount = 5.5; break; case "4": amount = 10; break; } $("div.total-text").text("£" + (total + amount)); }); </code></pre> <p>but there is no change , my previous amount did not add with that. while am clicking previous amount only displayed on browser.. i need when i cliks radio button the value should change correspondingly.. where i did that mistake...plz give me some idea and what should i do..is there any need for storing db..</p> <p>thanks in adv</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload