PageWidth how to assign a value to a variable?
How to use PageWidth variable in JavaScript?
PageWidth how to assign a value to a variable?
The return value of a script expression is the "last" variable on a line of its own.
var result = "1";
result;
If the script expression is more than just one or two lines I recommend to structure it as follows: create a function that returns a value and call that function on the last line of your script expression. You do not have to do it like this, but it is generically applicable.
function someFunction(par1, par2)
{
var returnValue;
//perform stuff that gives returnValue the correct value
return returnValue;
}
someFunction("first parameter",second_parameter);
Freddy
var result = "1";
result;
If the script expression is more than just one or two lines I recommend to structure it as follows: create a function that returns a value and call that function on the last line of your script expression. You do not have to do it like this, but it is generically applicable.
function someFunction(par1, par2)
{
var returnValue;
//perform stuff that gives returnValue the correct value
return returnValue;
}
someFunction("first parameter",second_parameter);
Freddy