in reply to How do I send information to Javascript from perl?
For example, if "foo" is a value you want the JS code to see, your program should at some point do something like this in the midst of transmitting JS code:
print "foo = '\Q$foo\E'\n";
NOTE: Using \Q should protect against most metacharacters in the variable, but you should be quite careful to determine if it does what's appropriate for JS quoting conventions.
-- Chip Salzenberg, Free-Floating Agent of Chaos
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I send information to Javascript from perl?
by Parham (Friar) on Jan 01, 2002 at 03:37 UTC |