PopupForm onChange of DropDown

May 23, 2011 at 5:35 AM

How could I call a popup form, from the onchange event of my select list?

May 23, 2011 at 7:08 AM

$('#sl').change(function(){ callpfactioncontroller(); });

the MakePopupForm generates a function named call + pf + actionname + controllername

you can see it by looking at the source of your page (html)

you can also use Url.PopupFormAction which generates callpfactioncontr()

May 23, 2011 at 4:06 PM

Perfect.  Thanks as always.

May 23, 2011 at 6:53 PM

This is working perfectly for my dropdown now.

How could I assign a custom function to the "cancel" button of the popup form.  I'd like to reset the original selection of dropdown if the user cancels the popup.  Currently, cancel only closes the popup.

May 23, 2011 at 9:56 PM
Edited May 23, 2011 at 9:58 PM

you can use anything from here http://jqueryui.com/demos/dialog/#event-close

you just need to know the name of you div; which is pf+ action + controller

$( "#pfactioncontroller" ).bind( "dialogclose", function(event, ui) {