ASP.NET Weblogs

Welcome to ASP.NET Weblogs Sign in | Join | Help
in Search

Mike Diehl's WebLog

Much aBlog about nothing...

ASP.NET and popup pages...

I'm not an ASP.NET expert by any means, so I post this question to the Blogsphere...

I have a student who is a Lotus Notes developer, who commonly uses javascript to open a “popup window” from the browser as a dialog box, have the user select some values, and post those results (somehow) back to the calling page. This is easily enough done in Windows Forms, but is there a corresponding paradigm in ASP.NET?

We've been talking about postbacks and linking to different pages, but never any parent/child or dialog type page to page relationships. I think the paradigm for ASP.NET applications is just different.

Is that right? Or can it be done (easily)?

Mike

Published Feb 11 2004, 03:03 PM by MikeD
Filed under:

Comments

 

Alex Lowe said:

February 11, 2004 4:08 PM
 

Shannon J Hager said:

This probably does what you need:

http://www.metabuilders.com/Tools/DialogWindow.aspx

February 11, 2004 4:25 PM
 

Jon Galloway said:

I'd agree you should go with the MetaBuilders deal if that does what you need.

I've worked with a function that sets form fields on the window.opener form, which is essentially what the Metabuilders control does. Here's a simple function that does this:

function SetImageId(imageID,imageSrc) {
var i, inp = self.location.search.substr(1);
var queryString = new Object();
if (inp.length > 0) {
var ary = inp.replace(/\+/g, " ").split("&");
for (i in ary) {
ary[i] = unescape(ary[i]).split("=");
queryString[ary[i][0]] = ary[i][1];
}
}

var form = queryString["formname"];
var field = queryString["fieldname"];
var field2 = queryString["imagename"];
var srcString = 'uploads/images/' + imageSrc;

eval("window.opener.document." + form + "." + field + ".value='" + imageID + "';");
eval("window.opener.document." + form + "." + field2 + ".src='" + srcString + "';");
window.close();
}
February 11, 2004 4:29 PM
 

Joel said:

Is the question "how to do this" or "is this the right thing to do" ?
February 11, 2004 11:44 PM
 

dfdf said:

dgdgdgd
May 26, 2004 11:30 AM
 

stefan demetz said:

August 7, 2004 7:28 PM