all groups > flash actionscript > december 2005 >
You're in the

flash actionscript

group:

Simple Question about passing variable into a function


Simple Question about passing variable into a function asiabackpacker
12/8/2005 10:22:55 PM
flash actionscript:
How do I concatenate the getURL string in the function below so that
featuredProductNum gets passed into the spot that currently reads product5?

callJavascript = function(featuredProductNum){
getURL("javascript:switchContent(product5);");
}
Re: Simple Question about passing variable into a function stephan.k
12/8/2005 10:42:09 PM



function callJavascript(featuredProductNum){
getURL("javascript:switchContent("+featuredProductNum+");");
}



Re: Simple Question about passing variable into a function asiabackpacker
12/8/2005 11:06:19 PM
Cool-that worked.

Re: Simple Question about passing variable into a function Jeckyl
12/9/2005 12:00:00 AM
callJavascript = function ( featuredProductNum ) {
getURL ( "javascript:switchContent(product" + featuredProductNum + ");" );
};

Re: Simple Question about passing variable into a function stephan.k
12/9/2005 5:28:26 PM
AddThis Social Bookmark Button