is there any way to get the radio button value by using ajax code. already i have used jquery.i have a five radio buttons with five different values.. how do i make it by ajax. how to give the name in data url. button NAME=code .. need some example. `
..$.ajax({
type: "POST",
url: "include/make.php", `
can any one tell me clearly
thanks
nancy
It’s not entirely clear what you’re asking, but for instance if you’re trying to trigger the ajax call when the button is clicked:
…will call
make.phpwith anamefield set to thevalueproperty of the radio button that was clicked. Above I’ve used the name “xyz” for the radio buttons, but obviously switch that to be whatever their actual name is. You said you wanted to send the name of the radio button, but I’ve assumed you wanted its value, since of course the name wouldn’t vary in the above (it would always be “xyz”).If you really want its name, I assume you’ll be hooking the event on more radio buttons. This example hooks all radio buttons on the page, and sends their
nameandvaluetomake.php: