astadtla / csexwb2

Automatically exported from code.google.com/p/csexwb2
0 stars 0 forks source link

Blocking display of javascript prompt function #48

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm using the WBDocHostShowUIShowMessage event and this is working for
alert and confirm methods, but it doesn't appear to be called for the
prompt method.  Is there any way to hook that method as well?

Original issue reported on code.google.com by andy.bru...@gmail.com on 13 Jun 2008 at 4:34

GoogleCodeExporter commented 8 years ago
WBDocHostShowUIShowMessage event is fired from the implementation of 
IDocHostShowUI.ShowMessage which can only handle alert and confirm methods. It 
does 
not handle VBScript MsgBox and inputBox functions and javascript prompts. This 
is 
not a bug. It is a limitation of IDocHostShowUI interface.

One possible solution is to use CBT hook to handle prompts and inputboxs by 
subclassing the dialogs when the dialog is initialy being created. I will try 
to add 
an example of how to acheive this in the next update.

Regards,

MH

Original comment by mehr...@gmail.com on 16 Jun 2008 at 10:20

GoogleCodeExporter commented 8 years ago
Thanks, that's what I figured out after some research on Friday and that's the
approach I'll be taking.  It's good to get some confirmation that it's the 
correct
approach to take.  I've got to add that I've written some similar controls 
including
a protocol handler, and the depth and completeness of your implementation is
astounding.  It is truly a first rate product.

Original comment by andy.bru...@gmail.com on 16 Jun 2008 at 2:08