Hi,
I want to pass String array to the javascript function when the page is getting loaded. Iam using jsp and javascript for doing this. But could not able to send the Stirng array to the javascript function.
<%! String msg[] = {"one","two","three"}; %>
<input type="button" name="save" value="Save" onclick="show(msg);" />
below is my javascript function:
function show(msg)
{
alert("in show");
alert("---" + msg.length);
}
In my above code iam using onClick but my requirement is when the page gets loaded the String array have to load in the javascript function. I have tried in another ways also but its not getting displayed in the javascript function. Thanks in advance.
Regards.