Categories

HTTP REFERER header not set when location.href is used for page navigation | Microsoft Connect

Its pretty frustrating to see that IE doesn’t set the ‘referer’ header when navigating pages using ‘location.href’. The header is set properly if you are using anchor tags (<A>) to navigate through pages.

Normally this is much of an issue for navigation unless you validate using the referer header. One such case is when you are [...]

Pixel to EM converter

Its been 6 months since I am working on this project and just when I thought I am done with it, I realize that I have been using Pixels in my stylesheets all the while and this doesn’t support the browser based “text size” settings (Internet Explorer). So, when the user changes the ‘text size’ [...]

innerHTML issue in IE

There are number of articles on internet that talk about the fix for the innerHTML issues in IE. some are

http://support.microsoft.com/kb/276228

http://domscripting.com/blog/display/99

None of these work when you try to insert javascript into the <script> tags. Thats because all these solutions talk about using a wrapper <div> for the content and it won’t work if you are trying [...]

Unclosed <P> before <form> breaks form submit in IE when using jQuery

If you are facing issues with form submits using jQuery in IE because of unclosed <P> tags.

Try this:

var form = $(document).find(“form”);

var frm = form.parent().html();

if(frm.toLowerCase().indexOf(‘form’) > -1 && frm.toLowerCase().indexOf(‘/form’) == -1) {
var frmTag = frm.substring(frm.toLowerCase().indexOf(‘<form’), frm.toLowerCase().indexOf(‘>’)+1);
var rest = frm.substring(frm.toLowerCase().indexOf(‘>’)+1);
form.parent().remove();
form.before(frmTag);
form.prepend(rest);
}