My asp.net site is running well on IE6, IE7, IE8, IE9, Chrome, Safari, Firefox and Opera. But it is not working at all in IE10.
If I click anywhere in the site (any button, any link, etc) it returns the following error:
SCRIPT5022: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: x
Actual value was 5.999999523162842.
JS things, like tabs, doesnt work due to this problem. I tracked down the problem and it is in MicrosoftAjax.js , specifically in the following method.
Sys.UI.Point = function Sys$UI$Point(x, y) {
/// <param name="x" type="Number" integer="true"></param>
/// <param name="y" type="Number" integer="true"></param>
/// <field name="x" type="Number" integer="true"></field>
/// <field name="y" type="Number" integer="true"></field>
var e = Function._validateParams(arguments, [
{name: "x", type: Number, integer: true},
{name: "y", type: Number, integer: true}
]);
if (e) throw e;
this.x = x;
this.y = y;
It works on all other IE versions since 6, which is quite a fate.
I know that HTML is only supported by real browsers, leaving out Internet Explorer, but my client really wants the site to work in IE10.
Just to be clear, it works well in ie6 to 9, chrome, firefox and opera. None of them show javascript errors, just ie10, and this error comes up on every click. I copule not track who is calling this method. This is a big site and none of the js code that i use is calling it. I think that probably MicrosoftAjax.js framework has bound the click event and it is executing something but i am not sure what it is executing.
Can anyone help me?
I found a nice solution blogged by Yuriy:
<script language="javascript">
Sys.UI.Point = function Sys$UI$Point(x, y) {
x = Math.round(x);
y = Math.round(y);
var e = Function._validateParams(arguments, [
{name: "x", type: Number, integer: true},
{name: "y", type: Number, integer: true}
]);
if (e) throw e;
this.x = x;
this.y = y;
}
</script>
Paste this on your page to override the Sys$UI$Point function to round the numbers.
Or, set <compilation debug="false">
Either of these worked for me.
The answer is in the following link:
http://support.microsoft.com/kb/936993
I had to change Microsoft.Ajax.js.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With