Dear Sir/Madam,
I’m trying to create a relative simple function:
function test2(menuname) {
menuname2 = (menuname + ‘_arrow’);
menuname2.src = ‘images/layout/syg_selecter_arrow_on.gif’;
}
I don’t know much about Javascript or programming in general. Though I thought this should work, but it does not. Basically I need to know how to tack on a static variable (i.e. _arrow) on my argument.
When I try to use document.write to see what menuname2 is set to it simply reads [object]_arrow. I’m not sure if this is part of the problem, that the javascript does not really merge these two variables in one “string” but simply considers them separate entities or what. If anyone would please shed some light on how to get this to work properly I would very much appreciate it. (This test function is supposed to be part of a larger one).
Thank you!
Regards,
Steve