I have the following in my code, which has worked fine in IE 7 and 8, but it no longer works in IE 9 (unless the user runs in compatibility mode of course...)
<asp:Label ID="invNumLink" runat="server" Font-Underline="true" ForeColor="Blue" Text='<%# Eval("Order_No") %>' createDate='<%# string.Format(Eval("create_date").ToString(),"MM/dd/yyyy") %>'
operatorNo='<%# Eval("operator_no") %>' orderNo='<%# Eval("Order_No") %>' loc='<%# Eval("Location") %>' table='<%# Eval("table_no") %>' recall='<%# Eval("recall_code") %>'
orderID='<%# Eval("ID") %>' acrID='<%# Eval("ACR_ID") %>'
onclick="goToDetail(this.orderNo,this.createDate, this.operatorNo, this.loc, this.table, this.recall, this.orderID, this.acrID);" style="cursor:pointer" ></asp:Label>
<script type="text/javascript">
function goToDetail(orderNo, createDate, operatorNo, loc, table, recall, orderID, acrID) {
var URL = 'OrderDetailView.aspx?orderNo=' + orderNo + '&' + 'createDate=' + createDate + '&' + 'operatorNo=' + operatorNo + '&' + 'loc=' + loc + '&' + 'table=' +
table + '&' + 'recall=' + recall + '&' + 'id=' + orderID + '&' + 'acrID=' + acrID;
day = new Date();
id = day.getTime();
window.open(URL, id, 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1100,height=700,left = 62,top = 15')
}
</script>
In IE9 all of the values sent to the "goToDetail" function are undefined. Any ideas on how to fix this?
EDIT
I resolved this by adding the call to javascript from the code behind:
invNumLink.Attributes.Add("onclick", string.Format("goToDetail('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}'); return false;", item.GetDataKeyValue("Order_No").ToString(),
string.Format(item.GetDataKeyValue("Create_Date").ToString(), "MM/dd/yyyy"),item.GetDataKeyValue("Operator_No").ToString(), item.GetDataKeyValue("Location").ToString(),
item.GetDataKeyValue("table_no").ToString(), item.GetDataKeyValue("recall_code").ToString(), item.GetDataKeyValue("ID").ToString(),item.GetDataKeyValue("ACR_ID").ToStrin
Thanks,
Aaron