Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
First Time Click in popup radio button show address value in page but in second time click on another radio button but address value not show in page
My code
$(document).ready(function(){
    //e.preventDefault();
    $("input[type='radio']").on('change',function(){
        var radioValue = $("input[name='savedAddress']:checked").val();
        var getFirstName = $(".getFirstName"+radioValue).text();
        var getLastName = $(".getLastName"+radioValue).text();
        var getAdd = $(".getAdd"+radioValue).text();
        var getState = $(".getState"+radioValue).text();
        var getSa = $(".getSa"+radioValue).text();
        var getPt = $(".getPt"+radioValue).text();
        var getCity = $(".getCity"+radioValue).text();
        var getountry = $(".getountry"+radioValue).text();
        //alert(getFirstName);
        $("#changeCountrytext").parent().html("");
        $("#changeStatetext").parent().html("");
        $("#changeFnametext").parent().html("");
        $("#changeLnametext").parent().html("");
        $("#changeAddtext").parent().html("");
        $("#changeCitytext").parent().html("");
        $("#changePostalCodetext").parent().html("");
    });
});


What I have tried:

i Don't get solution,,,,please solve
Posted
Updated 8-Jun-18 20:09pm
v2
Comments
[no name] 9-Jun-18 2:13am    
Can you show the HTML you use this with?
Also there's an obvious typo in 'getountry', but that may or may not be related.
Mohibur Rashid 9-Jun-18 8:43am    
$("#target_tag_id").parent().html("");

this destroy "#target_tag_id" object
Richard Deeming 9-Jun-18 10:40am    
That sounds like the answer to me. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900