Cancel browser widget navigation?

Trevor DeVore lists at mangomultimedia.com
Fri Jan 5 10:59:04 EST 2018


On Fri, Jan 5, 2018 at 9:45 AM, hh via use-livecode <
use-livecode at lists.runrev.com> wrote:

> > > hh wrote:
> > > 2. Don't do the navigation in the widget but later on in browsers:
> > > Not really from a widget property. But you could use an attribute that
> the
> > > widget can't do: to open a new window. This works in "hhTextEditBasic".
> > >
> > > set the htmltext of widget 1 to
> > > <a href="http://www.screensteps.com" target="_blank">Trevor's Site</a>
> > >
> >
> > TD wrote:
> > The browser widget I’m working with is a Froala editor. The user will be
> > inserting their own content into the browser widget.
>
> Then you could add in "onChange" of the editor an insert of
> target="_blank".
> So the links won't work in the widget but in browsers.
> I use this in the free hhTextEdit-Full (to appear) that also does editing
> like
> the paid Froala.
> May be similar to this (here written with jQuery), preserving
> on-page-links:
>
> onChange: function(contents, $editable) {
> $('a').each(function () {
> if ($(this).attr('href').charAt(0) != '#') $(this).attr('target','_blank'
> );});
> }
>

Yes, I am aware of how to cancel clicks using JavaScript. Remember that my
original post stated that I was looking for a way to cancel navigation
using a method other than JavaScript (which is the solution I’m currently
using) :-)

Ideally the browser widget would allow us to cancel navigation links using
LCS.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com



More information about the use-livecode mailing list