[tw5] Easy peasy Alert box

Follow-up to Just a goofy thought: a way to get javascript into a Tiddler

The “Hello World” alert box sample:

Download the attachment and drag into TiddlyWiki.com

The content of the “Hello World” tiddler:

<$vars this_html={{{ [[data:text/html,<script>alert('Hello World !!! \n\n]addsuffix[Today is ]addsuffix<now "DDD, DDth of MMM, YYYY">addsuffix[.]addsuffix[');</script>]] }}} >
<iframe srcdoc={{{ [<this_html>] }}} sandbox="allow-scripts allow-popups-to-escape-sandbox allow-same-origin allow-modals" style="display:none;"></iframe>

Hello World.json (456 Bytes)

1 Like

A ridiculously simple setup for Alert Box functionality.

Download the attached and drag into TiddlyWiki.com

This has three tiddlers:

  • Alert Box Tester
  • Alert Box Tiddler CSS
  • Alert Box Tiddler

After importing, take a look at Alert Box Tester.

Then open Alert Box Tiddler, and start playing.

SimpleAlertBoxSetup.json (1.95 KB)