The problem here is that, unlike Perl and PHP, JavaScript does not use a special character to indicate a variable name, meaning that you can't just thrown one into the middle of a string and expect it to be substituted.
In the following line, JavaScript sees the variable names as just normal text:
Quote:
Originally Posted by shifter
Code:
<input type='hidden' name='params' value='args[0] args[1]" />
|
Instead, you have to concatenate the variables onto (or into) the string:
Code:
<input type='hidden' name='params' value='" + args[0] + " " + args[1] + "' />\