Thanks for your suggestions. Unfortunately, I left out some important
details in my OP and so I'm still trying things.
The Google Charts are generated in an iframe, which is where the selection
handler is. It means the handler is not in the context of the widget/macro,
so 'this' isn't meaningful.
I can access 'window.parent.$tw' and I've seen code fragments that make it
look like I should be able to do the following:
window.parent.$tw.rootWidget.dispatchEvent( { type:'tm-navigate',
navigateTo: 'Tiddler Name Here' } );
Nothing happens.
I've tried a couple of other event properties too: setting 'param' the same
as 'navigateTo', and setting 'navigateFromTitle' to the name of the tiddler
hosting the macro call. Nothing for those either. Not even error messages
in the console.
Thanks again for your help. Hoping you or anyone else might have some new
ideas...
On Sunday, 10 July 2022 at 2:13:06 am UTC+8 BJ wrote:
> or maybe
> this.dispatchEvent({type: "tm-navigate", navigateTo:tids[i]});
>
>
> On Saturday, July 9, 2022 at 4:12:28 PM UTC+2 BJ wrote:
>
>> from within a widget/macro use
>>
>> this.caller.dispatchEvent({type: "tm-navigate", navigateTo:tids[i]});
>>
>> On Saturday, July 9, 2022 at 9:30:01 AM UTC+2 andrewg_oz wrote:
>>
>>> I've recently been experimenting with using Google Charts in TiddlyWiki.
>>> It's going quite well (see my other thread), but I can't work out how to
>>> open a tiddler in javascript (i.e. the Google Chart selection handler)
>>> without using window.location = '#' + tiddlerNameHere;
>>>
>>> That works, but sets the address bar and looks ugly. I'm sure there's a
>>> better way.
>>>
>>> Can anyone help?
>>>
>>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/f1379948-0c2c-4b96-a4be-798bd2205b9bn%40googlegroups.com.