I have two buttons in a form and two different pages have to be called when they are clicked. when button1 is clicked then page1 must be loaded and when button2 is clicked t
Try this:
$('#button1').click(function(){ $('#formId').attr('action', 'page1'); }); $('#button2').click(function(){ $('#formId').attr('action', 'page2'); });