Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

showModalDialog opens page into a new window after posting

Status
Not open for further replies.

dpdoug

Programmer
Joined
Nov 27, 2002
Messages
455
Location
US
I'm calling this showModalDialog from the main form to confirm with the use that certain values are correct. When I do a postback to save the values to a variables, instead of closing like it should, it opens the confirm.aspx page in a new full-sized window.

calling page (orders.aspx):
Code:
	at = Form1.chkAutoOffrent.checked;
	var PopupWindow=null;
	var opt = 'dialogWidth:350px; dialogHeight:230px; center:yes; scroll:no; status:no';
	window.showModalDialog('confirm.aspx?auto='+at, '',opt);

confirm.aspx:
Code:
<script language="javascript">
<!--
	function closeMe(){
		self.close();
}
//-->
</script>

Is there any way to avoid this from happening?
 
And on top of this it doesn't fire the code. I have already thought of using an iframe in an html page, and opening the aspx page inside the iframe, but I need to pass an argument on the QueryString:

'confirm.aspx?auto='+at
 
Modal dialogs are supposed to return data only to opener window. Any GET/POST to server opens new window. :(

What about IFRAME inside modal dialog?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top