Basically I fill an ArrayList in C# then Invoke a javascript where I pass this Array. The .Count ArrayList is passed accurately but when I try to read values in it, I get "undefined".
Anyone know why or what I need to do to be able to read the values?
C# code:
void PassData_BtnClick(object sender, EventArgs e)
{
ArrayList SelectDisplay = new ArrayList();
SelectDisplay.Add("Start");
SelectDisplay.Add("One Test");
SelectDisplay.Add("Two Test");
SelectDisplay.Add("Three Test");
browser.Document.InvokeScript("DisplayArrayValue", new object[] { SelectDisplay});
}
html & javascript:
<html>
<body>
<script language="javascript" type="text/javascript">
function DisplayArrayValue(sDisplay)
{
alert("sDisplay[3] = " + sDisplay[3]);
}
</script>
</body>
</html>
Thanks!
Sean Murphy
Anyone know why or what I need to do to be able to read the values?
C# code:
void PassData_BtnClick(object sender, EventArgs e)
{
ArrayList SelectDisplay = new ArrayList();
SelectDisplay.Add("Start");
SelectDisplay.Add("One Test");
SelectDisplay.Add("Two Test");
SelectDisplay.Add("Three Test");
browser.Document.InvokeScript("DisplayArrayValue", new object[] { SelectDisplay});
}
html & javascript:
<html>
<body>
<script language="javascript" type="text/javascript">
function DisplayArrayValue(sDisplay)
{
alert("sDisplay[3] = " + sDisplay[3]);
}
</script>
</body>
</html>
Thanks!
Sean Murphy