You need to log in before you can comment on or make changes to this bug.
The makeButton function can currently only take 1 javascript parameter, which is pretty limiting. Maybe the makeButton function should stop adding quotes around the parameter in case it's a string parameter, so that an application developer can just add in a comma separated parameter string. Or it should be possible to pass in an array. As a workaround I had to add my own link around the button <a> and give the makeButton function a dummy empty javascript function as a first argument, otherwise it does not hover. Any thoughts?
you can pass an array as a paramater and it should be converted into a javascript array when passed to your javascript function. You just need to know what is in the array :)
Paul, so this means it is an assumption of the button API to only support javascript functions on the onClick event which take 1 parameter? A simple parameter, or an array or object? But not functions which take 2 or more simple parameters?
that's correct. To support multiple simple parameters, you need to put them into an array. But I think it should be possible to support multiple parameters. I've become a fan of the 'arguments' array in javascript functions recently: function varArgs( /*variable number of arguments*/ ) { var i; var szArgs = ""; var szSep = ""; for (i=0; i<arguments.length; i++) { szArgs = szArgs + szSep + arguments[i]; szSep = ","; } alert( "arguments were " + szArgs ); }