Matt Fletcher wrote:
>
> I agree that was a very poorly worded question and am well aware of 
> its IE specific nature.
>
> I don’t believe I can register a callback in this instance as I need 
> to close the pop up and return a value when a user clicks on a 
> hyperlink within the popup itself. Aren’t callbacks limited to window 
> events such as clicking the close button, or resizing the window?
>

Callbacks are not limited at all, at least, not more than a function is 
limited. If you want to catch the click on a hyperlink, just add the 
onclick handler to the hyperlink, either programmatically (if you have 
no access to the source of the page), or in the original html code of 
the page and set it to the onOk method. Even if you use PWC for opening 
external links, this is still possible, but you must be aware of IFRAME 
oddities and security issues involved.

> In any case, I decided to call an update method (present in the main 
> page) from the pop up passing in the return value object which does 
> the job ok.
>

If it does the job, it is perfect of course.

> Just out of interest Abel, you say you don’t like to force users to 
> use modal popups, which is a feature of PWC. Why is that? I ask 
> because I’m using modal popups to either force the user to select a 
> Contact, or close the window and return to the main window which 
> doesn’t seem to be limiting or frustrating the user.
>

I believe there is a little confusion about what "modal" means. 
Historically, a "modal" window prohibits any input events (mouse events, 
key events) to the parent window. In HTML / Internet world, this was 
still true: alert("hello world") blocked the whole parent window (the 
browser window!) for the user. If the user did not want to click "ok", 
it had no option but to kill the process of his browser (this was 
particularly annoying if some program bug repeatedly showed message boxes)

Then came PWC. They re-invented the "modal" dialog box. Now the "parent" 
is not the browser anymore, but he "parent" is the page itself. Leaving 
the user the option to just click the browsers close button, or back 
button, or type another URL or anything, to move out of the page.

Now, PWC cannot do anything you cannot do yourself. The term "modal" is 
nothing more than something that is visually modal (and some help of 
z-order and overlays). For instance, in all my PWC modal dialog, I still 
catch the body ondblclick and do something with it (as an escape, I give 
my users a way to popup a debug window when clicking 
ctrl-alt-shift-dblclick on any location anywhere). This would never be 
possible with traditional modal dialog windows.

Because PWC is just javascript, you have access to everything and you 
can change its behavior in any way you like, even without touching the 
source. Did you know you could override methods by just redefining them?

Cheers
-- Abel Braaksma

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to