Actually, the post method
$(document).ready(function(){ $('#registerButton').on('click',function(){ var lot1 = $('#text').val(); $.post( 'obrabotchik.php', // Π°Π΄ΡΠ΅Ρ ΡΠ°ΠΉΠ»Π° Ρ ΠΎΠ±ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠΌ {lot:lot1}, function (data){ $('#otvet').html(data); }); }); }) got a sample of radio paths
<input type="radio" id="inputReg" value="One"> <input type="radio" id="inputReg" value="Two"> When selecting a radio button, it is necessary to immediately transfer the value to the following form.
<input type="text" id="GR" value="ΠΠ½Π°ΡΠ΅Π½ΠΈΠ΅ ΡΠ°Π΄ΠΈΠΎΠΊΠ½ΠΎΠΏΠΊΠΈ"> I wanted to use the following function
$ ("#inputReg") .on ("click", function () {
// copy the value of the radio button to the form
("#GR") .val ($ ("input: checked") .val ());
});
It works only if the radio input was on the page initially, but it is loaded ignored.
How to change the last function to copy values ββfrom a loaded object?
id. You can separate the package for example one class. And the elements in the group are separated by one name. - Alex