Thread View: borland.public.cppbuilder.internet.web
6 messages
6 total messages
Started by Jesper Safholm
Thu, 30 Nov 2006 16:32
Pop-ups
Author: Jesper Safholm
Date: Thu, 30 Nov 2006 16:32
Date: Thu, 30 Nov 2006 16:32
14 lines
1389 bytes
1389 bytes
Hello! I just have a quick question: How can I block Pop-ups using CppWebBrowser in BCB6? Can i just post something in the "void __fastcall TForm1::CppWebBrowserOnNewWindow2"? /Jesper -------------------------------------------------------------------------------- Jag anv�nder en gratisversion av SPAMfighter f�r privata anv�ndare. 560 spam har blivit blockerade hittills. Betalande anv�ndare har inte detta meddelande i sin e-post. H�mta gratis SPAMfighter idag!
Re: Pop-ups
Author: Remy Lebeau (TeamB)
Date: Thu, 30 Nov 2006 18:41
Date: Thu, 30 Nov 2006 18:41
21 lines
1577 bytes
1577 bytes
"Jesper Safholm" <jesper@safholm.com> wrote in message
news:456f0781$1@newsgroups.borland.com...
> I just have a quick question: How can I block Pop-ups using
> CppWebBrowser in BCB6?
> Can i just post something in the "void __fastcall
> TForm1::CppWebBrowserOnNewWindow2"?
As is stated in the documentation:
"Cancel allows the event handler to block the creation of a new window.
When the event handler sets Cancel to true, the Web browser tries to display
the target resource in its current window, starting with an
OnBeforeNavigate2 event."
So simply set the Cancel parameter to true in both the OnNewWindow2 and
OnBeforeNavigate events.
Gambit
Re: Pop-ups
Author: Jesper Safholm
Date: Fri, 01 Dec 2006 14:19
Date: Fri, 01 Dec 2006 14:19
15 lines
1540 bytes
1540 bytes
>> "So simply set the Cancel parameter to true in both the OnNewWindow2 and OnBeforeNavigate events." I'm quite new to this, so what should I exactly should I write? Just "Cancel = true"; or should there be something before that? /Jesper -------------------------------------------------------------------------------- Jag anv�nder en gratisversion av SPAMfighter f�r privata anv�ndare. 575 spam har blivit blockerade hittills. Betalande anv�ndare har inte detta meddelande i sin e-post. H�mta gratis SPAMfighter idag!
Re: Pop-ups
Author: Jesper Safholm
Date: Mon, 04 Dec 2006 08:39
Date: Mon, 04 Dec 2006 08:39
13 lines
1558 bytes
1558 bytes
Ok, I've figured out how to use the *Cancel parameter, but I enounter another problem. When I use it on both 'NewWindow2' and 'BeforeNavigate2', the normal page won't even show. Is there a way to get around this? /Jesper -------------------------------------------------------------------------------- Jag anv�nder en gratisversion av SPAMfighter f�r privata anv�ndare. 599 spam har blivit blockerade hittills. Betalande anv�ndare har inte detta meddelande i sin e-post. H�mta gratis SPAMfighter idag!
Re: Pop-ups
Author: Hans Galema
Date: Mon, 04 Dec 2006 09:10
Date: Mon, 04 Dec 2006 09:10
13 lines
1464 bytes
1464 bytes
Jesper Safholm wrote: > Ok, I've figured out how to use the *Cancel parameter, Then you should post the used code here for all that follow this thread. > but I enounter > another problem. When I use it on both 'NewWindow2' and 'BeforeNavigate2', > the normal page won't even show. That is probably because you now always cancel BeforeNavigate2. Instead you should only cancel BeforeNavigate2 once after you cancelled NewWindow2. Hans.
Re: Pop-ups
Author: Remy Lebeau (TeamB)
Date: Mon, 04 Dec 2006 19:43
Date: Mon, 04 Dec 2006 19:43
14 lines
1482 bytes
1482 bytes
"Jesper Safholm" <jesper@safholm.com> wrote in message news:4573deb2$1@newsgroups.borland.com... > When I use it on both 'NewWindow2' and 'BeforeNavigate2', the normal > page won't even show. Of course not, because you are blocking everything now. Inside the BeforeNavigate2 event, you have to set Cancel on a request-by-reuest basis instead. Don't set it to true unless you really want to block a page, such as when the NewWindow2 event had been triggered beforehand. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads