Browser Widget usage examples

Moderators: LCMark, LCfraser

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2120
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Browser Widget usage examples

Post by [-hh] » Sun Sep 01, 2019 8:29 pm

Widget usage example #27: NoNavigation/NoBackNavigation

As this was several times a question in the forum and also in the use-list here a method that works in the browser widget on all platforms that support it.

This is the first and only (without 'side effects') working method of a lot of answers I found on stack overflow. It cleverly uses CSS! Credits are in the stack.

You can choose to have

• either no navigation at all or
• no back navigation only

from the current page by simply using check buttons.

The script is short but better to understand with a demo, it adds a short javascript to every page that you open (see card script).

The attached stack is tested to work with LC 9.5.0 on MacOS 10.14.6, Windows 10 and Ubuntu 1604 (64bit).
 
Attachments
noNav-noBackNav.livecode.zip
(2.75 KiB) Downloaded 63 times
noNav.png
shiftLock happens

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2120
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Browser Widget usage examples

Post by [-hh] » Fri Oct 11, 2019 11:28 pm

Widget usage example #28: ELIZA_bot

This stack is a GUI to the javascipt library elizabot.js by Norbert Landsteiner.
The library and the vocabulary of the bot are already part of the stack (so you can use it offline).

Find this default vocabulary also attached so that you can make changes/additions (follow exactly the syntax there!).
The stack has a button "importData" that loads the (changed) library using a dialog into the browser widget and saves it to the stack *overwriting the default vocabulary*.

The attached stack is tested to work with LC 9.5.0 on MacOS 10.13.6/10.14.6/10.15.0.
Using LC 8.1.10 it runs also on Window 7/10 and Ubuntu 1604 (64bit).
(This is due to deficiencies of the browser widget in LC 9.5.0 on Windows and linux).
 
Attachments
elizabot.livecode.zip
The stack (incl. jslib and vocabulary).
(22.47 KiB) Downloaded 66 times
elizadata.js.zip
The vocabulary (only needed for editing).
(4.72 KiB) Downloaded 31 times
elizabot.png
shiftLock happens

Post Reply

Return to “LiveCode Builder”