Loading...
 
Skip to main content

Development


Javascript variables into plugins

Hi,

I'm begining to use Tikiwiki to develop some pages and I came across a problem:

I have designed a page with some HTML forms and which calls some plugins that I also created. Now, the thing is: I need to pass the value of some javascript variables to my plugin. Something like this:

{JS()}

var x = document.getElementBy(...);

document.write('{MYPLUGIN(param = x)}{MYPLUGIN}');

However, if I do that, my plugin receives 'x' instead of x's value...

Is there a way to do this?

Sorry if it's a simple question, but I just can't find a solution...

Thanks in advance.

Cheers, _

ups, that didn't went well...

The idea of the code is:

JS

var x = document.getElementBy(...);

document.write('MYPLUGIN(param = x) {MYPLUGIN}');