Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 6 of 6 total |
Adding to the body tag |
Tue, Jul 2 2013 8:16 AM | Permanent Link |
Matthew Jones | I want to disable the context menu for my application, to stop "print" and "view
source" etc. StackOverflow says that I need this: <body oncontextmenu="return false;"> And indeed, it works. Is there a way to do this in EWB? I can hack the html file, but a proper way would be nice. I just tried this, but it doesn't compile due to no OnContextMenu property, which doesn't exist in the framework at all: GetBodyElement.OnContextMenu := MyContextMenu; /Matthew Jones/ |
Tue, Jul 2 2013 9:03 AM | Permanent Link |
Matthew Jones | I've now found that in Chromium I can stop the popup using OnBeforeMenu, and the
most useful thing is that the Result is True to stop the menu, not false as you might expect. I can stop the popup window navigating to another site too from my normal links (I shall redirect them to the default browser instead). It might still be nice to know the answer as to how to add to the DOM. /Matthew Jones/ |
Tue, Jul 2 2013 1:27 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< I've now found that in Chromium I can stop the popup using OnBeforeMenu, and the most useful thing is that the Result is True to stop the menu, not false as you might expect. I can stop the popup window navigating to another site too from my normal links (I shall redirect them to the default browser instead). It might still be nice to know the answer as to how to add to the DOM. >> You have to add an event listener for the document (or the relevant element) in order to listen for, and cancel the default behavior. You can do this with your own code, but it is probably best that I add support for it in the new event manager. Tim Young Elevate Software www.elevatesoft.com |
Tue, Jul 2 2013 1:28 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
Look at: procedure TEventManager.SetEventHandlers; in the WebCtrls unit. That will give you an idea of how to capture/delegate such an event for all elements in the application. But, again, this is probably above and beyond what you care to muck about with. Tim Young Elevate Software www.elevatesoft.com |
Tue, Jul 2 2013 3:38 PM | Permanent Link |
Matthew Jones | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:
> Look at: > > procedure TEventManager.SetEventHandlers; > > in the WebCtrls unit. That will give you an idea of how to > capture/delegate such an event for all elements in the application. But, > again, this is probably above and beyond what you care to muck about with. Thanks - I will investigate. I think it is good that we can add obscure things if needed - you can't have the whole kitchen sink in the framework. -- Matthew Jones |
Mon, Jul 8 2013 2:20 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< Thanks - I will investigate. I think it is good that we can add obscure things if needed - you can't have the whole kitchen sink in the framework. >> I agree, but certain things like common events are going to have to be handled in a standardized way. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, December 9, 2024 at 02:00 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |