VincentM
(Meert Vincent)
1
JQuery Conflict - Ajax Validation Not working
Hi everybody. and thx for reading ![:)](http://www.yiiframework.com/forum/public/style_emoticons/default/smile.gif)
I have a strange error. :s
my error appear in firebug when I set enableAjaxValidation, or enableClientValidation to true.
In my layout I called JS like this :
When my page with the activeForm is loaded, my JS is loaded like this :
In my view I have :
In My controller I have :
Where is the problem ? The redefinition of the JS is a problem?
is it something else?
I already tried this without any success…
and
(I put this in the head of my layout but I don’t really understand it’s purpose… )
thx in advance for your help ![:)](http://www.yiiframework.com/forum/public/style_emoticons/default/smile.gif)
Hi,
you are loading jquery 2 times look at the code…
try to avoid duplicate jquery …i hope it will solve your problems
<script src="/LayoutColloques/assets/461bd74a/jquery.js" type="text/javascript"></script>
[size=2]<script src="/LayoutColloques/javascript/jquery.min.js" type="text/javascript"></script>[/size]
[size=2]
[/size]
[size=2]
[/size]
VincentM
(Meert Vincent)
3
yes I know, but, this line :
<script src="/LayoutColloques/assets/461bd74a/jquery.js" type="text/javascript"></script>
is autogenerated by the widget I think. I didn’t call it. In My layout I call only
and I need it on each page to expand my menu.
VincentM
(Meert Vincent)
4
It is possible to ask to the widget to call
<script src="/LayoutColloques/assets/461bd74a/jquery.js" type="text/javascript"></script>
<script src="/LayoutColloques/assets/461bd74a/jquery.yiiactiveform.js" type="text/javascript"></script>
in a different place? like under the CActiveForm, or just above it?
VincentM
(Meert Vincent)
5
I don’t understand… but I comment this line :
And it works…
My hidded menu too …
there is no logic in this, isn’t it?
Anyway, thx a lot and have a good day.
(can I change the name of the topic whith "solved" tag? )
Hi vincent,
There is a logic behind this…
I think u have jquery in your javascript folder (static file)
yii automatically solve some dependency for widget… so its load one more time … thats all…
I hope my statement is clear for you ![:)](http://www.yiiframework.com/forum/public/style_emoticons/default/smile.gif)
Have a nice day