Javascript macro: Passing an array as argument

87 views
Skip to first unread message

juan erasmo gomez

unread,
Apr 28, 2017, 4:33:43 PM4/28/17
to TiddlyWiki
Hi

I'm working on a javascript macro that creates a series of tables and I need to send an array with the number of columns of each table to the macro. I'm not very familiar with javascript (this is in fact my first attemp at it) so I'm not really sure what are my options in this case.
What is the best way to do this?

Thanks,

Mark S.

unread,
Apr 28, 2017, 8:10:54 PM4/28/17
to TiddlyWiki
Can you just send over a string with the columns and then have it split by the macro?

sending "1,3,2,4" to param "arg"

var myAra = arg.split(",") ;

Good luck,
Mark

juan erasmo gomez

unread,
May 2, 2017, 4:51:01 PM5/2/17
to TiddlyWiki
That works perfectly. Thanks
Reply all
Reply to author
Forward
0 new messages