Wednesday, May 25, 2011

IE9 [Tidy Error] in Umbraco

In the mean time to solve this problem is to force the compatibility mode in IE9 inside the umbraco folder

This how you can do this

Header name : X-UA-Compatible
Value : IE=8

image

Tuesday, May 24, 2011

Google Chrome Autofill for password

Recently I found an error in my web apps when I ran it to Google Chrome.

After debugging , It seems Google Chrome do prefill after the page load and trigger the javascript.

So be careful to have this javascript which purposely trigger login button on change on password text box.


var setupTriggerButton = function ()
{
//for login trigger
//DON'T DO ONCHANGE - only use keypress, because browser (Chrome) can automatically fill and cause postback
/*
$(".txtTriggerButton").live("change", function (e)
{
var rel = $(this).attr("rel");
if (rel && rel != "")
{
$(rel).click();
}
});
*/
//trigger login
$(".txtTriggerButton").live("keypress", function (e)
{
var rel = $(this).attr("rel");
if (rel && rel != "")
{
//$.log('run from DISABLE DEFAULT BUtton');
return runFunctionOnEnter(e,
function ()
{
$(rel).click();
}
);
}
});
}