HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Javascript error in IM/chat

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#80372 (In Topic #16316)
Avatar

Fan in action

javascript errors

While using Firefox (not sure if it happens in other browsers) and going into an IM or trying to start one I get this error:

An error occurred when loading this screen onto the web browser. You are being notified of this as you are staff. If you believe this is a bug in the website software, please contact ocProducts with full details. More details are available in your browser's error console. The error was:

166: result.responseXML is null
/themes/world/templates_cached/EN/javascript_chat.js

I was getting another error along with this about an image missing but I fixed that one. I am using Ocportal 7.1.5 I think it is.

Nothing happens in IE either


Last edit: by bigguy
Back to the top
 
Posted
Rating:
#80374
Avatar

Community saint

Looks like the chat script may just need a bit of extra error handling.

While Chris will know the proper fix, I can provide a temporary fix if you can't wait for Chris.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#80376
Avatar

Fan in action

I can impliment your fix now and then use his later. That's fine, and thank you very much.  :thumbs:
Back to the top
 
Posted
Rating:
#80377
Avatar

Community saint

Ok, try this:

In JAVASCRIPT_CHAT.tpl, change:

Code

   var responses=result.responseXML.getElementsByTagName('result');
   if (responses[0])
   {
      window.instant_go=true;
      _handle_signals(false,true,responses[0]);
      window.instant_go=false;
   }
to:

Code

   try
   {
      var responses=result.responseXML.getElementsByTagName('result');
      if (responses[0])
      {
         window.instant_go=true;
         _handle_signals(false,true,responses[0]);
         window.instant_go=false;
      }
   }
   catch (e) {};

After saving the changes, flush the server side caches (Admin Zone Tools Website cleanup tools) and your local browser cache.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#80378
Avatar

Fan in action

OK, the error I get now on all pages is this:

An error occurred when loading this screen onto the web browser. You are being notified of this as you are staff. If you believe this is a bug in the website software, please contact ocProducts with full details. More details are available in your browser's error console. The error was:

168: catch without try
/themes/world/templates_cached/EN/javascript_chat.js
Back to the top
 
Posted
Rating:
#80381
Avatar

Fan in action

OK, I fixed that error. I was not sure if the word try was supposed to be in there. Now when I go to my site there are no errors but still nothing happens at all.
Back to the top
 
Posted
Rating:
#80382
Avatar

Community saint

That strange, you shouldn't be getting that error  as the catch definitely has a try. All I did was basically add this:

Code

try
{
   //Problem code goes here
}
catch (e) {};

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#80383
Avatar

Fan in action

OK, I think it does work. I jumped the gun a bit. I will have to wait til I get a user online. It's a new site so that might be a day or so but I will post back the results. Thank you sir for all your help so far.  :thumbs:
Back to the top
 
Posted
Rating:
#80388
Avatar

Thanks temp1024.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: