Resolving conflicts on DWR with jQuery
Since DWR’s util.js uses $ as an alias to ‘dwr.util.byId’ function, it may not have a smooth integration with jQuery as $ is also used by the latter as a function alias. In order to resolve this conflict, one could follow snippet:
<script type='text/javascript' src='/mycontext/js/jquery-1.3.2.min.js'></script>
<script type="text/javascript">
var jq = jQuery.noConflict();
</script>
<script type='text/javascript' src='/mycontext/dwr/engine.js'></script>
<script type='text/javascript' src='/mycontext/dwr/util.js'></script>
<script type="text/javascript">
jq(document).ready(function()
{ //other function calls
});
</script>
‘jq’ variable defined in place of $ to invoke the rest of other jQuery functions.
dwr/util.jsfor
Jaylord said,
September 11, 2009 at 10:17 am
tnx bro..u save me
Intesar Shannan Mohammed said,
November 2, 2009 at 5:37 am
Thanks worked perfectly