>
> > I spend half of day trying how can I get variables communicating between
> > perl code and javascript.
> > In my cgi application , i need to call some javascript function and also
> > passing some variables to it.
> > However these variables are pre-process in perl script like
> $somevariable
> > The call javascriptfunction($somevariable) does not work.
> > Is it any method working with it?

Can you be more explicit?  You didn't put quotes around $somevariable -
so either you are getting perl to print the variable name, or you are
passing a number to the a routine called javascriptfunction.

  $somevariable = 'a_var_defined_elsewhere_in_the_JS_code';

is okay if you've done what is implied....

  $somevariable = 10;

is also okay if your funciton expects a number as an arg ....

  $somevariable = 'foo';
  print JSOUTPUTFILE "javascriptFunction('$somevariable');\n";

Hope that helps
lee




Lee Goddard  http://www.leegoddard.com
Perl / XML / XSLT / Java / Iconoclasm

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to