/    Sign up×
Community /Pin to ProfileBookmark

showModalDialog postback problem

Hi!

I’m using showModalDialog to open a form that has several funcionalities. In that form, after i click a button that fires an serverside event, a new window is opened with the expected result. I want to see the results in the modal window that i first opened and not in a new window. I already tried to set the target in the form to _self, but that doesn’t work. Can someone help me.
Thanks. Hope you can understand what i just wrote…

Z

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@Mr_MooAug 23.2007 — showModalDialog will always open a new window on any links (form submissions included). The way I have gotten around it in the past is to embed an iframe in the dialog and put your content in there. The other option is to use AJAX (but that's not going to help you with ASP.NET post backs).
Copy linkTweet thisAlerts:
@FangAug 23.2007 — afaik it is not possible to keep the modal window open after processing the form.

You will have to open a new modal window from the window containing the form results.
Copy linkTweet thisAlerts:
@zleaoauthorAug 23.2007 — So what you are saying is that it is impossible to have postback events in a modal window. Everytime that a postback e generated, in a modal window, a new window will be opened... That sucks!!!

Thanks a lot, anyway!!

Great forum!
Copy linkTweet thisAlerts:
@Mr_MooAug 23.2007 — Yes. But if you use the iframe hack I mentioned, you can continue using your modal dialogs. Note, though, that showModalDialog is IE only, so it's fine for an Intranet, but don't be hosting that on the Interwerb.
Copy linkTweet thisAlerts:
@zleaoauthorAug 23.2007 — Thank you. I've just used your 'iframe hack' and work out perfectly! Yes, this is for intranet users, and all of them are IE users. But thanks for the tip!

Z
×

Success!

Help @zleao spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...