Home > Forum

Support Forum

Announcer error with IE8

Announcer error with IE8

Postby clever_monkey » Thu Jul 14, 2011 3:04 pm

Hi,

I get the following error from Announcer when using IE8 to view my site's home page:

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?
clever_monkey
 
Posts: 4
Joined: Thu Jul 14, 2011 3:02 pm

Re: Announcer error with IE8

Postby vaakash » Thu Jul 14, 2011 3:46 pm

Did 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.
User avatar
vaakash
Site Admin
 
Posts: 672
Joined: Sun Jan 17, 2010 11:15 am
Location: India

Re: Announcer error with IE8

Postby clever_monkey » Thu Jul 14, 2011 6:51 pm

The ID is set to 'announcement' in the options page for the Announcer plugin.

The line that is throwing the error is:
Code: Select all
document.getElementById(tgId).style.display = 'block';


If I do the following:
Code: Select all
alert(tgId);

I get a popup that says announcement, 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.
clever_monkey
 
Posts: 4
Joined: Thu Jul 14, 2011 3:02 pm

Re: Announcer error with IE8

Postby vaakash » Fri Jul 15, 2011 12:13 pm

I 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: Select all
if(toggleGetCookie(tgId) == null || toggleGetCookie(tgId) == 'show'){
   toggleHide(tgId);
}else{
   toggleShow(tgId);
}

with
Code: Select all
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.
User avatar
vaakash
Site Admin
 
Posts: 672
Joined: Sun Jan 17, 2010 11:15 am
Location: India

Re: Announcer error with IE8

Postby clever_monkey » Fri Jul 15, 2011 1:40 pm

Unfortunately, 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: Select all
<?php if(function_exists('announcer')) { announcer();} ?>

in the template file for the site's home page.

It seems to be a problem with the line
Code: Select all
document.getElementById(tgId).style.display = 'block';

in the toggleShow() function.

Is it possible that, if the announcement is turned off, the
Code: Select all
<div id="announcement">
isn't generated?
clever_monkey
 
Posts: 4
Joined: Thu Jul 14, 2011 3:02 pm

Re: Announcer error with IE8

Postby vaakash » Fri Jul 15, 2011 2:17 pm

In he announcement_close.js replace the lines
Code: Select all
function toggleInitiliaze(tgName){
   if(toggleGetCookie(tgName) == 'hide'){
      toggleHide(tgName);
   }else{
       toggleShow(tgName);
   }
}

with
Code: Select all
function toggleInitiliaze(tgName){
if(!document.getElementById(tgName)){
   if(toggleGetCookie(tgName) == 'hide'){
      toggleHide(tgName);
   }else{
       toggleShow(tgName);
   }
}
}

Hope this will work. Also make your site active
User avatar
vaakash
Site Admin
 
Posts: 672
Joined: Sun Jan 17, 2010 11:15 am
Location: India

Re: Announcer error with IE8

Postby clever_monkey » Fri Jul 15, 2011 2:27 pm

vaakash wrote:
Code: Select all
function toggleInitiliaze(tgName){
if(!document.getElementById(tgName)){
   if(toggleGetCookie(tgName) == 'hide'){
      toggleHide(tgName);
   }else{
       toggleShow(tgName);
   }
}
}



I used
Code: Select all
if(document.getElementById(tgName))


and it worked. Thanks!
clever_monkey
 
Posts: 4
Joined: Thu Jul 14, 2011 3:02 pm

Re: Announcer error with IE8

Postby vaakash » Fri Jul 15, 2011 2:43 pm

Happy 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 !
User avatar
vaakash
Site Admin
 
Posts: 672
Joined: Sun Jan 17, 2010 11:15 am
Location: India

Re: Announcer error with IE8

Postby hitman1972 » Thu Aug 04, 2011 10:37 am

ciao, same error here. clever_monkey solution works fine :-)
hitman1972
 
Posts: 2
Joined: Thu Aug 04, 2011 10:33 am

Re: Announcer error with IE8

Postby vaakash » Thu Aug 04, 2011 12:14 pm

fine...
User avatar
vaakash
Site Admin
 
Posts: 672
Joined: Sun Jan 17, 2010 11:15 am
Location: India


 


  • Related topics
    Replies
    Views
    Last post


Return to Announcer


phpBB SEO