-
AuthorPosts
-
July 14, 2011 at 3:04 pm #4460clever_monkeyGuest
Hi, I get the following error from Announcer when using IE8 to view my site’s home page:
Quote:Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2)
Timestamp: Thu, 14 Jul 2011 15:03:09 UTC
Message: Object required
Line: 43
Char: 2
Code: 0
URI: http://[site]/wp-content/plugins/announcer/announcement_close.js?ver=3.1.4
It works fine in Firefox. Any suggestions?
July 14, 2011 at 3:46 pm #5491Aakash ChakravarthyKeymasterDid you give a ID name for the announcement box ?? this seems to the bug !!! i think so.
If it re-occurs, give me the page URL, i’ll find the bug.
July 14, 2011 at 6:51 pm #5490AnonymousGuestThe ID is set to ‘announcement’ in the options page for the Announcer plugin.
The line that is throwing the error is:
Code:document.getElementById(tgId).style.display = ‘block’;
If I do the following:
Code:alert(tgId);
I get a popup that saysannouncement, which is the name of the id that I’ve set on the options page.If you need to see the error, try http://mancini.brandonu.ca/ with IE8.
July 15, 2011 at 12:13 pm #5492Aakash ChakravarthyKeymasterI got no error when i tested the plugin in IE8 and I cant access your site !!
I Checked the plugin in this page —-> http://vaakash.kodingen.com/blog/?p=1
If the problem re occurs replace the lines
Code:if(toggleGetCookie(tgId) == null || toggleGetCookie(tgId) == ‘show’){
toggleHide(tgId);
}else{
toggleShow(tgId);
}
with
Code:if(tdId.length > 0){
if(toggleGetCookie(tgId) == null || toggleGetCookie(tgId) == ‘show’){
toggleHide(tgId);
}else{
toggleShow(tgId);
}
}Please check using this code. But in native, there is no error or i didn’t get any error to debug.
July 15, 2011 at 1:40 pm #5493AnonymousGuestUnfortunately, that didn’t work.
Further information:
It’s only happening when the announcement is turned off (ie, the plugin is installed, but there is currently no announcment being displayed).
We’re using it by placing the code
Code:
in the template file for the site’s home page.It seems to be a problem with the line
Code:document.getElementById(tgId).style.display = ‘block’;
in the toggleShow() function.Is it possible that, if the announcement is turned off, the
Code:isn’t generated?
July 15, 2011 at 2:17 pm #5494Aakash ChakravarthyKeymasterIn he announcement_close.js replace the lines
Code:function toggleInitiliaze(tgName){
if(toggleGetCookie(tgName) == ‘hide’){
toggleHide(tgName);
}else{
toggleShow(tgName);
}
}
with
Code:function toggleInitiliaze(tgName){
if(!document.getElementById(tgName)){
if(toggleGetCookie(tgName) == ‘hide’){
toggleHide(tgName);
}else{
toggleShow(tgName);
}
}
}
Hope this will work. Also make your site activeJuly 15, 2011 at 2:27 pm #5495AnonymousGuestvaakash wrote:Code:function toggleInitiliaze(tgName){
if(!document.getElementById(tgName)){
if(toggleGetCookie(tgName) == ‘hide’){
toggleHide(tgName);
}else{
toggleShow(tgName);
}
}
}I used
Code:if(document.getElementById(tgName))
and it worked. Thanks!
July 15, 2011 at 2:43 pm #5496Aakash ChakravarthyKeymasterHappy that it worked. But it is strange problem. You should not get a alert. The browser should take this silently. Anyway happy that this worked !
August 4, 2011 at 10:37 am #5498AnonymousGuestciao, same error here. clever_monkey solution works fine 🙂
August 4, 2011 at 12:14 pm #5497Aakash ChakravarthyKeymasterfine…
-
AuthorPosts
- The topic ‘Announcer error with IE8’ is closed to new replies.