
Passing values from client vars to Server script
Can we do something like this:
<%
dim MatchedRetailers
set Matched Retailers = MyComObject.DefaultInterface()
'Matched Retailers is an array
Response.write("<LABEL NAME"Label1" onclick= 'LabelClicked(4)'
Quote:
>12345</LABEL>")
'
%>
<SCRIPT Language= "JAVAScript">
function LabelClicked(index)
{
/* i want to display the record/item in array whose index was passed from
the OnClick event , following code first line doesn't work but if i hardcode
the value of index as in line 2 it works*/
alert("<%=MatchedRetailers.Item (%>" + index + "<%)" + ".DunsNumber%>")
alert('<%=MatchedRetailers.Item(2).DunsNumber%>')
Quote:
}
</SCRIPT>