> Is it possible to just put javascript into a tiddler and have it run
> when the tiddler is opened?

It is possible, yes.

> I've run through plugin and macro demos and I understand them, but I'd
> like to know if it's possible to just put code into one tiddler and
> run it there for that tiddler.  And if so, then how?
>
> How would I make something like
> alert("Hello World");
> run every time I open this tiddler - but NOT with a plugin or macro?

The TWCore doesn't support embedded scripting by default.  To embed
javascript within a tiddler, so that it is invoked when the tiddler is
rendered, you can install:
   http://www.TiddlyTools.com/#InlineJavascriptPlugin

Then, you can write:
   <script>
      alert("Hello World");
   </script>

or, if you want to render wiki-formatted output within the tiddler:
   <script>
      return "Hello World";
   </script>

You can also create 'onclick' links, that invoke their code only when
clicked.  For example:
   <script label="click me">
      alert("Hello World");
   </script>
or
   <script label="what time is it?">
      return new Date().formatString("0hh:0mm:0ss")
   </script>

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

----
WAS THIS ANSWER HELPFUL?  IF SO, PLEASE MAKE A DONATION
   http://www.TiddlyTools.com/#Donations
note: donations are directly used to pay for food, rent,
gas, net connection, etc., so please give generously and often!

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to