Closed (fixed)
Project:
AJAX Comments
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Apr 2010 at 08:17 UTC
Updated:
2 Nov 2010 at 16:50 UTC
I detected and error in Internet Explorer 8. The error comes from javascript.
// Creating title link.
form.parents(".box").find("h2:not(.ajax-comments-processed),h3:not(.ajax-comments-processed),h4:not(.ajax-comments-processed)").addClass('ajax-comments-processed').each(function(){
title = $(this).html(); <-- Error on this line
$(this).html('<a href="'+action+'" id="comment-form-title">'+title+'</a>');
$(this).parents(".box").find(".content").attr('id','comment-form-content').removeClass("content");
});
I don't know what happen but IE keep appear error at this line.
Comments
Comment #1
dbluu commentedI have this issue as well. Explicitly declaring the title variable's scope seems to fix it:
var title = $(this).html();
It's good practice to do this for all Javascript variables to avoid implied global variables.
Comment #2
rjbrown99 commentedComment #3
rjbrown99 commentedCommitted to -dev. Thank you.
http://drupal.org/cvs?commit=438592