rohitb
rohitb

Reputation: 235

Submit a form created in a popup window

I have a page where I create a popup. On the popup created, I click on a radio button created on the popup and on click of a button I need to submit the form and pass the radio button value using post method to a new page. How can I achieve this using jquery or javascript?

Upvotes: 2

Views: 446

Answers (1)

Daniel Li
Daniel Li

Reputation: 15379

Try using AJAX:

Reference: http://api.jquery.com/jQuery.ajax/

$.ajax({
  type: "POST",
  url: "post_page.php",
  data: { radio: $("radio_btn").val() }
}).done(function( msg ) {
  alert("Done!");
});

Upvotes: 1

Related Questions