0

When i am deploying my application in weblogic9.2, i am getting javascript error "Object doesn't support this property or method",but the functionality on button click are happening.But when i am deploying in weblogic11g the same javascript error is blocking the functionality and the button click nothing is happening.

When i debug found the java script error coming from the below code.

<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){ // error comes from here
    $('.button').each(function() {
        $(this).attr('title', $(this).attr('value'));

And here is the code where jquery is included

<script type="text/javascript" src="<html:rewrite page='/asset/js/jquery-1.10.2.min.js'/>"></script>

Is this the problem with jquery version with weblogic 11g ? Can anybody help me on this?

  • Do you mean that the error does not point to a line of code? – Álvaro González May 07 '14 at 08:42
  • No. The error is pointing to the above line of code. But my question is why it is blocking the flow only when deployed in weblogic 11g. When i am deploying in weblogic 9.2 even though same java script error is there, the flow working fine on button clicks. – user3611296 May 08 '14 at 10:18
  • "Above line of code is" `$(this).attr('title', $(this).attr('value'));`? – Álvaro González May 08 '14 at 10:22
  • error comes from the line "$(document).ready(function(){". So, just thinking since this is jquery code, is it possible that weblogic 11g is not compatible with the jquery version. Because same code works in weblogic 9.2 – user3611296 May 09 '14 at 11:57

1 Answers1

0

The issue is resolved now. The problem was not due to jQuery version. I think this is additional security feature in Weblogic 11 which blocks Ajax calls. Due to that on button click the call was not happening and no action happened. Added the below entry in web.xml under the servlet and it worked.

 <init-param>
     <param-name>crossDomainSessionSecurity</param-name>
     <param-value>false</param-value>
 </init-param>
Patrick
  • 3,490
  • 1
  • 37
  • 64