8

I'm using a tabPanel and cannot get the tabs to switch. When I move the mouse over to or click on a tab, I see this error:

Uncaught TypeError: Cannot call method 'replace' of undefined 3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScript:107 Element.Methods.removeClassName 3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScript:107 RichFaces.outTab tabPanel.js:18 onmouseout

<apex:outputPanel layout="none">
    <apex:tabPanel switchType="client" selectedTab="the1stTab" tabClass="activeTab" inactiveTabClass="inactiveTab">
    <apex:tab label="abc" title="abc" name="the1stTab" id="the1stTab">
        </apex:tab>
        <apex:tab label="def" title="def" name="the2ndTab" id="the2ndTab">
        </apex:tab>
   <\apex:tabPanel>
<\apex:outputPanel>

Any advise why this happens?

  • Something isn't being initialized correctly. Can you post a snippet of your JavaScript and VF? – Mike Chale Nov 21 '13 at 15:56
  • Its not my JS, I think it's SF JS – Dedo Nov 21 '13 at 16:28
  • Did you try a different browser? Ensure that JS on the browser is not turned off. – subodhbahl Nov 21 '13 at 22:20
  • I didn't try other browsers because I'm using tabpanel on other pages and it is working fine. It is something specific to this page – Dedo Nov 22 '13 at 10:32
  • I faced the same issue and i solved it.Please find the link salesforce.stackexchange.com/questions/21207/… – sfdc Dec 5 '13 at 21:27
7

I just saw this happen on a Visualforce page I was developing. It appears to be a conflict of jQuery.

I added this code, and it resolved the issue for me.

<script type="text/javascript">
   var j$ = jQuery.noConflict();
</script> 

From there, anywhere you reference jQuery, use j$ instead of $

-1

You Can use, JQuery.noConflict() or Simple $.noConflict() for avoiding JQuery Conflict in script tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.