473,378 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

window.showModalDialog and PostBack

I'm currently opening an aspx page (myModalASPX) as a dialog box from
client-side script using window.showModalDialog(blah blah blah).

The dialog opens as expected. Now I'm adding functionality to the dialog
box/aspx page that causes a postback. What currently happens is that after
the postback, myModalASPX page is rendered back to the client in a new
browser window - which gives me *two instances* of myModalASPX in the
client - one being in the original modal window and another that's in a
separate browser window. Not good.

What does it take to show an aspx page as a modal dialog box *and* enable it
to post back to the server - which subsequently renders the updated version
back to the original modal dialog box (and not to a new window)?

Thanks!

Nov 18 '05 #1
2 7161
it must be contained in a frameset in the modal window.

-- bruce (sqlwork.com)
"Henry Johnson" <ok**@dokey.com> wrote in message
news:Oe******************@TK2MSFTNGP10.phx.gbl...
I'm currently opening an aspx page (myModalASPX) as a dialog box from
client-side script using window.showModalDialog(blah blah blah).

The dialog opens as expected. Now I'm adding functionality to the dialog
box/aspx page that causes a postback. What currently happens is that after
the postback, myModalASPX page is rendered back to the client in a new
browser window - which gives me *two instances* of myModalASPX in the
client - one being in the original modal window and another that's in a
separate browser window. Not good.

What does it take to show an aspx page as a modal dialog box *and* enable it to post back to the server - which subsequently renders the updated version back to the original modal dialog box (and not to a new window)?

Thanks!

Nov 18 '05 #2
Hi Henry,

Just add the following in the <head> section of your aspx page:

<base target=_self>

Andrei.
"Henry Johnson" <ok**@dokey.com> wrote in message
news:Oe**************@TK2MSFTNGP10.phx.gbl...
I'm currently opening an aspx page (myModalASPX) as a dialog box from
client-side script using window.showModalDialog(blah blah blah).

The dialog opens as expected. Now I'm adding functionality to the dialog
box/aspx page that causes a postback. What currently happens is that after
the postback, myModalASPX page is rendered back to the client in a new
browser window - which gives me *two instances* of myModalASPX in the
client - one being in the original modal window and another that's in a
separate browser window. Not good.

What does it take to show an aspx page as a modal dialog box *and* enable it to post back to the server - which subsequently renders the updated version back to the original modal dialog box (and not to a new window)?

Thanks!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bsiang Tan | last post by:
Dear all expert, I use javascript to open a modal dialog window window.showModalDialog('child.aspx'); but in my child.aspx, got a button, when I click the button, it will do the postback,...
1
by: Pikolo Mondo | last post by:
hello, i've got a child window which will refresh the parent window after it closes heres the catch, if i use window.open() it works fine, but when i use window.showModelessDialog, the child window...
6
by: Scott Lee | last post by:
I am displaying an ASP.Net generated form in a popup opened with window.showModalDialog. The form contains DropDownList controls. The first ddl is populated via databinding to a datatable, has...
5
by: Nick Poulis | last post by:
In my page I use window.ShowModalDialog ---------------------------------------------------------------- Page.RegisterStartupScript("PopUpPerson", _ "<script language=""Javascript"">" & vbCrLf &...
6
by: SkeanDu | last post by:
Ok, here is my problem. I have an aspx page that displays a databound datagrid and in one of the datagrid column headers I have an image that when clicked opens up a modal web dialog (another...
2
by: Namespace | last post by:
Hi I am having a problem with opening a new browser window through a client-side javascript (window.open/_blank) function. The window do "pop up" but behind the window where I pushed the "pop...
1
by: dan_williams | last post by:
I'm trying to create a textbox control on an asp.net web page, that after a user has typed some text into it, another pop-up window appears with a dropdownlist populated with options related to the...
9
by: Stan B | last post by:
I create a popup window by calling window.showModalDialog Popup window has Ok button with this code attached: === string Script = "<script language=JavaScript>" + "{" + "window.close();" +...
0
by: nilayb | last post by:
Hi All, I am unable to get the page title after postback of the modal window using window.showmodaldialog. First time it displays the title but after postback event it doesnt. i am using C# ,.net...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.