| View previous topic :: View next topic |
| Author |
Message |
Elisabeth Kvarnryd Guest
|
Posted: Wed Feb 07, 2007 6:58 pm Post subject: CppWebBrowser popup |
|
|
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 |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Feb 07, 2007 11:55 pm Post subject: Re: CppWebBrowser popup |
|
|
"Elisabeth Kvarnryd" <jesper (AT) jptorrent (DOT) com> wrote in message
news:45c9cd27 (AT) newsgroups (DOT) borland.com...
| 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 |
|
| Back to top |
|
 |
Elisabeth Kvarnryd Guest
|
Posted: Thu Feb 08, 2007 4:43 am Post subject: 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 |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Feb 08, 2007 4:52 am Post subject: Re: CppWebBrowser popup |
|
|
"Elisabeth Kvarnryd" <jesper (AT) jptorrent (DOT) com> wrote in message
news:45ca5619$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Is it possible to avoid the "Internet Explorer Script Errors" that
appear sometimes? |
You have to create and register your own script debugger in order to
do that.
Gambit |
|
| Back to top |
|
 |
Enrique Guest
|
Posted: Thu Feb 08, 2007 11:38 pm Post subject: Re: CppWebBrowser popup |
|
|
Or you can set "Silent" property to true... it works for me.
bye
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> escribió en el mensaje
news:45ca584f$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
"Elisabeth Kvarnryd" <jesper (AT) jptorrent (DOT) com> wrote in message
news:45ca5619$1 (AT) newsgroups (DOT) borland.com...
Is it possible to avoid the "Internet Explorer Script Errors" that
appear sometimes?
You have to create and register your own script debugger in order to
do that.
Gambit
|
|
|
| Back to top |
|
 |
|