Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 23rd, 2005, 12:23 PM
Registered User
 
Join Date: Mar 2005
Location: MEXICO, DF, Mexico.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to nestor082
Default Modal Dialog (javascript & ASP.NET)

I am using window.showModalDialog method from client code in an ASP.NET Web form to open a modal window. When I try to do some processing in the modal window, it opens up another window displaying the results. Can the results be displayed in the same Modal window itself? How can I avoid this extra window?

Thanks in advance,

n
  #2 (permalink)  
Old March 30th, 2005, 05:41 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

What is the code that you are using?

One thing you could do (I’m shooting in the dark here somewhat, not knowing exactly what you are doing), is to pass the window to the modal dialog to permit access to the parent's variables, etc.
At the point that you are trying to change the contents of the modal dialog, instead fill in some global variables in the parent, close the modal dialog, then immediately open a new modal dialog with the information that you ‘posted’ back to the parent window.

(Not exactly an answer to what you asked, I know, but viable. Seeing what it is that you are up to would help give a more applicable answer.)
  #3 (permalink)  
Old March 30th, 2005, 08:38 PM
Registered User
 
Join Date: Mar 2005
Location: MEXICO, DF, Mexico.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to nestor082
Default

Hi,

I already found a solution and I'd like to share it. I'm calling the modal window from javascrit, using:

x=window.showModalDialog("ABC.aspx");

The problem araised when closing the modal window from server code:

Respose.Write("<script language=javascript>window.close();</script>")

This opened a new browser instance of the parent window. The solution is very simple and I found it in another forum. Just put the following tag in the <head> section of the modal window:

<base target="_self">

That's it.

Thanks and regards

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to return value from modal dialog ajaypsingh Javascript 2 May 16th, 2006 05:14 AM
Modal Dialog window Problem anandham Javascript 7 February 16th, 2005 06:08 PM
Modal dialog window eldanh ASP.NET 1.0 and 1.1 Basics 0 August 10th, 2004 02:07 PM



All times are GMT -4. The time now is 04:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.