tags:

views:

39

answers:

1

Hello,

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

+2  A: 
Lazarus
@Lazarus: please, see the edit above.
Richard77
That's true.. And even making the original page refresh repeatedly, after you clicked the button - you'll have to use javascript to do this.
Artiom Chilaru
@Richard77, I'd be really surprised if that was achieved without using javascript to process the return info from a window.open call.
Lazarus
@artiom-chilaru, not so. The data from the child page would be submitted directly back to the application and then retrieved when the page refreshes from the application (refresh doesn't need javascript). The other issue I missed was that the closing of the child window would require javascript.
Lazarus
Guys, I'm lost. Is it feasible or not? If that's the case, I'm ok with that. At least, I know that this solution is out of my list. I'll try something else or just use Javascript (But, how about if Javascript is disabled?... Ah?)
Richard77
@richard77 This is really only feasible if you use javascript. How many of your users really have javascript turned off??
Ryan
Lazarus
@Ryan: I thank you for the answer. You know, newbies, like me,tend to listen to what experienced developers say. Please, follow this link and will get to a question I asked a few months ago. http://stackoverflow.com/questions/2491239/what-happens-to-my-web-application-if-javascript-is-disabled
Richard77