I have Umbraco version
Umbraco v6.1.3 (Assembly version: 1.0.4954.19342)
and Contour version 3
I run MVC on the website
It is a clean umbraco install, and clean contour install
I have made a simple form, consisting of 2 inputs (2 textstrings). One of the inputs is mandatory
I can insert the form onto my razor file, and the form appears.
PROBLEM
client side validation fails
Uncaught TypeError: Cannot call method 'setDefaults' of undefined contourform.js:4
(anonymous function)contourform.js:4
(anonymous function)
I have the same problem. Seems like all the scripts aren't included by default. I added the following in Umbraco/Plugins/umbracoContour/Views/Script.cshtml
<script src="#Url.Content("~/umbraco/plugins/umbracocontour/scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/umbraco/plugins/umbracocontour/scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/umbraco/plugins/umbracocontour/scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
Above contourform.js. I'm running Umbraco 4.11 though.
I found the answer. U can See here
http://our.umbraco.org/forum/umbraco-pro/contour/45030-clientside-validation-fails-on-contour-3?p=0#comment162086
Related
I've a problem with my website, the layout load properly (and CSS) but no JS and page in yield.
I've copy paste the layout of my other website, inclued tje JS and CSS file, I do not understand why it does not work while on other sites it's good..
Code for include the JS and CSS file: <script src="{{url('js/jquery.min.js')}}"></script>
As you can see, the page is empty, and this is not normal.
Image of error:
Ahh... ok.
I've forget to DL From:: into my project. Sorry
I had the same problem when I was creating a recent Laravel project however mine was narrowed down too 2 problems. 1 being the JS had an error and 2nd was the way I called it.
I fixed it by doing the following:
<script type="text/javascript" src="{!! asset('js/jquery.min.js') !!}"></script>
I'm having an issue with the Add to Cart Button on my website. The error I am receiving is:
Uncaught TypeError: Cannot read property 'submit' of undefined
The link to the preview of this site is:
http://southeastsupfix.safetechhosting.co.uk/index.php/cp5000-429.html
Here is the full list of errors that I get:
I am sensing a possible JQuery conflict but I can't quite see where.
In terms of the inclusion of files, I had added these in the head.phtml
<script type="text/javascript" src="/js/JQ/jquery-1.2.6.js"></script>
<script type="text/javascript" src="/js/JQ/prototype.js"></script>
I have also tried the latest version of JQuery but I get the same issues.
If anyone has experienced this before I'd be great if I could get some information.
Replace $ in your jquery code with 'jQuery' like $('body') to jQuery('body')
I am using ajax controls. When I attach jquery.unobtrusive-ajax.min.js file only I am getting "Error: 'jQuery' is undefined". But when I attach jquery-1.4.4.min.js file too, everything is ok. Why?
Make sure you load it as follows:
<script src="#Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
It uses jQuery that is why it is needed. Plugins are built on top of jQuery and uses jQuery as the base. That is why it is needed on every page that has a jQuery plugin.
It's like building a house with no foundation. What will happen? The house will fall apart because there is nothing that it can stand on. The same scenario applies here.
because it uses jQuery... so you must include jQuery!
you need to include the reference to jQuery library for other jQuery plugins to work. Without jQuery present in your page,you can not run any jQuery plugins.
I integrate CKEditor in my MVC 3 application. But I couldn't integrate CkFinder to CKEditor. I read documents
I wrote this code in my view.
<script src="#Url.Content("~/ckeditor/ckeditor.js")" type="text/javascript"></script>
<script src="#Url.Content("~/ckfinder/ckfinder.js")" type="text/javascript"></script>
<script>
var editor = CKEDITOR.replaceClass("ckeditor");
CKFinder.setupCKEditor(editor, '/ckfinder/');
</script>
What I am doing wrong ?
Thank you.
CKEDITOR.replaceClass is a property, not a method so you should have an error right there.
All you need is the second call with a null editor and using the proper folder, maybe something like
CKFinder.setupCKEditor(null, '#Url.Content("~/ckfinder/")');
I upgraded from Struts 2.0.6 to 2.1.6 and converted all my Ajax themes to plugins. Everything works except the pathing has changed from relative to absolute. For example, here is the rendered HTML before upgrade:
<script type="text/javascript" src="../struts/simple/dojoRequire.js"></script>
And here it is after upgrade:
<script language="JavaScript" type="text/javascript" src="/myApp/struts/ajax/dojoRequire.js"></script>
Somehow the absolute "/myApp" is getting used instead of the relative ".." path.
Does anyone know how to force it to use the old-way of pathing?
Thanks for any tips.
I had to add baseRelativePath="../struts/dojo"
to the sx: head tag to get it to work.
I think this is actually a bug in the Dojo plugin (or at least should be documented that the 2.1 upgrade changes things, but I am happy it is working.
Scott