Hi Mike, you can enter text with a button like this:

<$button set="$:/myvar" setTo={{$:/temp/var}}>press to enter</$button> 
<$edit-text tiddler="$:/temp/var" tag="input" type="text"/>

 --- 
<$text text={{$:/myvar}}>

The text widget is very easy to understand - if you look at the source, you 
could probably start by adding some javascript to the render function.

Cheers

BJ

On Monday, August 17, 2015 at 12:28:56 PM UTC+1, Mike Sutton wrote:
>
> What I'm looking to be able to do is for the user to enter some text in a 
> text box in a tiddler, press a button and have a piece of JavaScript run 
> using the contents of the text box as input.  Having the output of the 
> JavaScript function injected into the page somehow is a bonus, but if not 
> then a simple alert box or console.log would suffice.
>
> I've been looking into macros, but have yet to find any that use this sort 
> of dynamic input/output.
>
> This is pretty simple to accomplish in vanilla web development, but I'm 
> trying to write it the Tiddly way, any pointers?
>
> Thanks,
>
>     Mike
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/66db6798-9bf3-4131-ab6e-f674dfbbcc4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to