Hi Jean-Charles > So it seems that the "onclick" part is discarded by TW5 at some point, and that what I want to achieve is not possible...
TiddlyWiki disallows inline JavaScript for security reasons; if wikitext could embed arbitrary JavaScript then there would be a security risk from importing any external content. The workaround is to create a JavaScript module (typically a widget). I think your problem can be resolved without JavaScript, though. The classic solution is to use a hidden iframe as the target for the link. a) Create a tiddler to contain the hidden iframe, and give the iframe a unique "name" attribute b) To ensure that the tiddler is always displayed you could tag it $:/tags/TopLeftBar c) Construct your links like this: <a href=" http://127.0.0.1:2701/path/of/file" target="nameofiframe">Link text</a> But nowadays you should be able to use the new "download" attribute: <a href="http://127.0.0.1:2701/path/of/file" download="filename">Link text</a> Clicking on a link with the download attribute forces the browser to download the resource, instead of navigating to it. Best wishes Jeremy. On Fri, Jan 2, 2015 at 8:24 AM, Jean-Charles <[email protected]> wrote: > > Ok, Problem was solved with a simple... reload of the whole page :-| >> > > But that is only for making a working javascript macro. > > output = '<a onclick=\'alert("alert");\' dumb=\'alert("alert");\' > href="xx">yy</a>'; > > It renders as : > > <a dumb="alert("alert");" href="xx">yy</a> > > So it seems that the "onclick" part is discarded by TW5 at some point, and > that what I want to achieve is not possible... > > > -- Jeremy Ruston mailto:[email protected] -- 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. For more options, visit https://groups.google.com/d/optout.

