There is a code:

Choose:

<input id="f4" type="radio" name="etaj3" value="1" /> Первое <input id="f4" type="radio" name="etaj3" value="2" /> Второе 

How to transfer to another file the value of $_POST['etaj3'] ?

To transfer values ​​from the text type I use the following code:

 $(document).ready(function() { $("#link").click(function() { var f1 = document.getElementById('f1'); $.ajax({ url: "file.php", type: "POST", dataType: "html", data: { f1: document.getElementById('f1').value, }, success: function(response) { $("#contentST").html(response); } }); }); }); 

I would be grateful for the help.

    1 answer 1

    To select the marked option, you can use the pseudo-selector : checked .

     var qqqq = $('input[name="etaj3"]:checked').val();