0

I have a MVC 4 project I am currently working on and need some advice on how to implement modal popups, preferably in jQuery.

For instance, on my view I have a zip code text box, with a lookup button next to it. The user can enter in the zip code directly, or click the lookup button. If the user clicks the button, I want to have a modal popup where the user can enter in a city and state and get a list of zip codes, select one, and then have that value posted to the zip code box on the original form.

This is just one example, I have more on that view, but this is the easiest to explain.

Anyone have any tips, links, or example code?

Thanks in advance on any help.

Ed DeGagne
  • 3,250
  • 1
  • 30
  • 46
  • 1
    Use jQuery UI Dialog? http://jqueryui.com/demos/dialog/ – CAbbott Jun 15 '12 at 13:48
  • There is complete solution here http://stackoverflow.com/questions/8541821/how-to-simplify-my-statefull-interlaced-modal-dialogs-in-asp-net-mvc –  Sep 05 '12 at 15:47

1 Answers1

2

how to implement modal popups, preferably in jQuery.

Generally jQuery dialog with modal : true and handled beforeClose is what you want

$(foo).dialog({ 
     modal: true,
     beforeClose: function(event, ui) { ... }
})
archil
  • 39,013
  • 7
  • 65
  • 82