Board index » cppbuilder » CppWebBrowser popup

CppWebBrowser popup


2007-02-07 08:58:46 PM
cppbuilder9
Hello
I'm having problems with creating a pop-up blocker. I know that I should
stop the navigation if there is a new window, but the problem is that it
doesn't navigate at all if I use *Cancel.
Any idea what I should write?
What I really want is a button that will change the caption to "Pop-Up
detected, do you want to show?" and when you click on it, it will show the
pop-up.
Does anyone have a smart code snippet I could use?
Regards
Ellisabeth
 
 

Re:CppWebBrowser popup

"Elisabeth Kvarnryd" < XXXX@XXXXX.COM >wrote in message
Quote
I'm having problems with creating a pop-up blocker. I know that I
should stop the navigation if there is a new window, but the problem
is that it doesn't navigate at all if I use *Cancel.
Yes, it does. Works fine when I use it. When a new window is
blocked, the navigation simply moves to the calling window that was
trying to open the new window. In order to actually stop the
navigation, you have to use the OnBeforeNavigate2 event in addition to
the OnNewWindow2 event.
Quote
What I really want is a button that will change the caption to
"Pop-Up
detected, do you want to show?" and when you click on it, it will
show
the pop-up.
IE doesn't work that way. You would have to use a popup prompt, such
as via MessageBox(), instead of a button on the form.
Gambit
 

Re:CppWebBrowser popup

Ok, I've managed to work it out.
I now have a new question. Is it possible to avoid the "Internet Explorer
Script Errors" that appear sometimes?
You have to click "Yes" all the time.
/Elisabeth
 

{smallsort}

Re:CppWebBrowser popup

"Elisabeth Kvarnryd" < XXXX@XXXXX.COM >wrote in message
Quote
Is it possible to avoid the "Internet Explorer Script Errors" that
appear sometimes?
You have to create and register your own script de{*word*81} in order to
do that.
Gambit
 

Re:CppWebBrowser popup

Or you can set "Silent" property to true... it works for me.
bye
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >escribi?en el mensaje
Quote

"Elisabeth Kvarnryd" < XXXX@XXXXX.COM >wrote in message
news:45ca5619$ XXXX@XXXXX.COM ...

>Is it possible to avoid the "Internet Explorer Script Errors" that
appear sometimes?

You have to create and register your own script de{*word*81} in order to
do that.


Gambit