This is what I want: Let’s say I have a textbox and a button on a page. when I click the button, I get a page in a new browser window where I can make some choices. when I click OK on that new window, it disappears and my choice appears in the textbox located in the first window.
How do I do that in ASP.NET MVC?
I know that what I’m trying to do can be easily obtained through JavaScript. However, I’d like to apply the unobtrusive principle. So, I’ll do first without JQuery in mind then, later, add JQuery.
EDIT
I remember with Yahoo Classic when you click “Contacts” button, a new window appears. On that window you have contacts with check boxes next to each contact. You check all the contacts you want to send the email to. When you click ok, the contacts window disappear and all the contacts appears in the Send to TextBox located in the first window.
Thanks for helping
You can’t really, the initial page could be set to refresh periodically and once the choices have been made and submitted to your MVC the next refresh would cause the page to pick up the new data other than that, without Javascript I don’t believe it’s possible.
EDIT
Thinking about this some more and following some of the comments there is another approach to be taken. If the desire is for a graceful degradation if javascript is disabled then the default mode of operation should be:
If javascript is available then the first stage would be to change the click event to now spawn the child window and in the child window change the submit to return the selections to the parent window which then uses those to update the display. With JQuery as well you’d have the ability to do this even slicker, i.e. an overlay loading the child page so you don’t even leave the browser window.