D
Doug Heeren
I have an application that uses a custom ajax library to inject xml generated
by a control using an httphandler. What I've run into is a problem with
javascript as an attribute value.
The following line of code used to work
e.setAttribute(attributes.nodeName, new Function(attributes.nodeValue));
where attributes.nodeName = "onclick" and attributes.nodeValue =
"jsfunction('value'); return false;"
ie8 in standards mode renders this as onclick="[object]" and this just
throws a javascript error when the user clicks on it
ie8 in compatibility mode renders this correctly as
onclick="jsfunction('value'); return false;" This works correctly for the
user.
Can anyone point me in the right direction in javascript to
1) identify ie8 as the browser
2) modify the line of code in error to something that works?
TIA,
by a control using an httphandler. What I've run into is a problem with
javascript as an attribute value.
The following line of code used to work
e.setAttribute(attributes.nodeName, new Function(attributes.nodeValue));
where attributes.nodeName = "onclick" and attributes.nodeValue =
"jsfunction('value'); return false;"
ie8 in standards mode renders this as onclick="[object]" and this just
throws a javascript error when the user clicks on it
ie8 in compatibility mode renders this correctly as
onclick="jsfunction('value'); return false;" This works correctly for the
user.
Can anyone point me in the right direction in javascript to
1) identify ie8 as the browser
2) modify the line of code in error to something that works?
TIA,