/    Sign up×
Community /Pin to ProfileBookmark

Help needed regarding ajax request

Hi All,
I have a scenario where in when i click on a link in a window, another window opens with a dialog box with buttons open, save and cancel button. Basically this is done using window.open(AjaxrequestUrl). Now my requirement is, dialog box opens, user should not be allowed to do any operation in the previous window. How will i be able to check if the dialog box has opened in another window from the parent window?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@mityaAug 05.2009 — Dialogues (alert, prompt, confirm and modals) DEMAND attention from the user, meaning he can't do anything to the opener until he has. Therefore window.open is not a modal, but a pop-up.

To ensure he can't do anything to the opener while the pop-up is active, you could either write a script which detects focus (onblur etc) and returns false on any actions called or, more simply, layer a partially-transparent DIV over the opener window which blocks all access to links and other functionality.

This div would be set to display:none initially, then set to display:block just before your pop-up opens.
×

Success!

Help @mpvkarthick 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.18,
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,
)...