Forms in Modal IE Window create a new window on postback!

G

Guest

In my page I use window.ShowModalDialog

----------------------------------------------------------------
Page.RegisterStartupScript("PopUpPerson", _
"<script language=""Javascript"">" & vbCrLf & _
"window.showModalDialog('Person.aspx?id=" & SelectedPersonID &
"','','dialogWidth:720px; dialogHeight:450px; status:eek:ff; center:Yes;
help:No; scroll:No;');" & vbCrLf & _
"</script>")
-----------------------------------------------------------------

to render a details page in a modal window. Yet when I press a button to
Save the
modifications on that page the page postbacks and redraws in a new window.

The Save button is a server side ASP:Button which for the moment does nothing.

How can I prevent a postback event to open a new window to redraw the page?
 
J

Jeffrey Todd

I hope his suggestion works for you...hasn't for me. I have done extensive
research on this and have received about 6 different solutions. -- the
*only* way I have found to solve the problem you describe is to have the
modal dialog be a frameset (or an iFrame). The pages that show up in the
frameset or iFrame can post back and will be redisplayed in the frame/iFrame
and will not open in a new window.

-HTH
 
J

Jeffrey Todd

That's not a universal solution - can't reasonably ask all users to disable
smart navigation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top