{"id":808,"date":"2003-06-05T22:00:00","date_gmt":"2003-06-06T07:00:00","guid":{"rendered":"http:\/\/www.cloudidentity.com\/blog\/2003\/06\/05\/showmodaldialog\/"},"modified":"2013-03-16T12:53:23","modified_gmt":"2013-03-16T21:53:23","slug":"8319","status":"publish","type":"post","link":"https:\/\/www.cloudidentity.com\/blog\/2003\/06\/05\/8319\/","title":{"rendered":"ShowModalDialog"},"content":{"rendered":"<p>I noticed that the following is an issue thru which people often run: when you show an aspx page (or any server content in general) in a dialog by mean of the javascript ShowModalDialog method, at the first postback you usually witness the instance of a second window, his time a full blown browser, holding in your output. <\/p>\n<p>There is an easy workaround to the situation, but surprisingly it seems that few people knows it: so I&#8217;m posting it.<\/p>\n<p>The trick is showing a static page , a simple .htm, in the ShowModalDialog call; such page should hold the active content (your .aspx)\u00a0in an IFRAME. Subsequent posts will be confined inside the iframe, hence restoring the intended user exprerience.<\/p>\n<p>UPDATE<\/p>\n<p>J proposes a more efficient system: &lt;base target=&#8221;_self&#8221;&gt;\u00a0 in the header of the aspx page yelds to the same result. Thank you J \ud83d\ude42<\/p>\n<div style=\"clear:both\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I noticed that the following is an issue thru which people often run: when you show an aspx page (or any server content in general) in a dialog by mean of the javascript ShowModalDialog method, at the first postback you usually witness the instance of a second window, his time a full blown&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-808","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts\/808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/comments?post=808"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts\/808\/revisions"}],"predecessor-version":[{"id":1941,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts\/808\/revisions\/1941"}],"wp:attachment":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/media?parent=808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/categories?post=808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/tags?post=808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}