Hi Friends,
I want to pass Array or Object as parameter in function
But can't, Here is my code
Please help me,
var InfoArray = new Array();
for(i=0;i<5;i++)
{
InfoArray['name'] = "ABC";
InfoArray['id'] = "A123";
j = i+1;
$('#selectorName').after("<input type='text' id='txt"+j+"+
"onFocus=prePopulate('txt"+j+"','"+InfoArray+"','Hello','Hi');>");
}
And Function is :
function prePopulate(txtName,myArray,path,msg)
{
alert(myArray['name']); // Shows me undefined..!!!
// .....
// .....
// .....
// .....
}
Please Help me and thx in advance.