I'm trying to use cookies for my Web site.
I saw some examples like this one :
https://jsfiddle.net/donejs/wMN7G/
but I have the following error:
"<a class='gotoLine' href='#84:28'>84:28</a> Uncaught TypeError: $.cookie is not a function"
After reading the solutions of this problem, I understood that this syntax : $.cookie is no more used. So I have tried to use this : Cookies.get('name') but it didn't work. Any ideas of how to fix it?
Related
I'm desperate because I don't find any solution on web for my problem.
I work with easytabs, and on every tab I have a different DataTable with different IDs. On page loading, I've to check, if a DataTable is still there.
On localhost everything works fine, but when i push it on the server I get the following error message:
Uncaught TypeError: Cannot read property 'fnIsDataTable' of undefined
My Code:
if ($.fn.dataTable.fnIsDataTable('#table-history')) {
$('#table-history').DataTable().destroy();
}
I can't explain why it is working on localhost, and any suggestions like "You've to load the jquery before datatable js file" don't solve this issue.
I hope you have any suggestions or experience with it.
Hope this help for you.
As #Eliellel said over here ,What you are trying is : trying to destroy datatable before its creation.
try to replace your function with mine.
if ($.fn.dataTable.fnIsDataTable('#table-history')) {
var table = $('#table-history').DataTable();
if(table){
table.destroy();
}
}
I need to be able to create a multipart mail message including images.
I found this suggestion Sending HTML code in a mail using Poco library but when I try this with VS2015/Windows/C++
Poco::Net::MediaType mediaType("multipart", "related");
I get
Error C2440 'initializing': cannot convert from 'initializer list' to 'int' AdvancedEmailer
Error C2079 'mediaType' uses undefined class 'Poco::Net::MediaType' AdvancedEmailer
I've looked at https://pocoproject.org/docs/Poco.Net.MailMessage.html but I can't figure out what's wrong
whats the correct usage for Poco::Net::MediaType
I am getting below mentioned error in Browser Console. I have used Contact form 7 and Google Captcha in wordpress site.
(1) Uncaught Error: ReCAPTCHA placeholder element must be empty
(2) Uncaught error: invalid recaptcha client id: undefined
Can please assist me to fix these issues.
Remove this from the <head></head>. It’s redundant.
<script src='https://www.google.com/recaptcha/api.js'></script>
This is old, and might be a duplicate, but this is the page I found trying to solve my problem, so I figured I'd add something towards an answer here.
I was getting the "ReCAPTCHA placeholder element must be empty" error, and it was because the recaptcha script was being called multiple times. I was able to resolve this with a custom callback on the recaptcha's onload event:
var recaptchacalls = 0;
var onloadCallback = function(e) {
grecaptcha.render('cap-' + recaptchacalls, {
'sitekey' : '<SITE_KEY_HERE>'
});
recaptchacalls++;
};
Note the count of how many times the script is called, using that as a unique identifier for the specific container that we need to be empty.
I would venture a guess that the other error is related, non-specific identifiers in multiple calls resulting in actions being attempted on the wrong object.
I get these Deps errors from time to time and I can never figure out what they mean or what they're pointing to:
Exception from Deps afterFlush function function: SyntaxError: Unexpected identifier
at eval (native)
at http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:372:22
at Function.jQuery.extend.globalEval (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:373:7)
at jQuery.ajaxSetup.converters.text script (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9806:11)
at ajaxConvert (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:8873:18)
at done (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9293:15)
at callback (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9753:8)
at Object.send (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9759:7)
at Function.jQuery.extend.ajax (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9244:15)
at Function.jQuery._evalUrl (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9409:16) debug.js:41
It thinks that there is a syntax error, but the only files it points to are jquery.js, which I HIGHLY doubt contain errors...
This error is caused by code in a Template helper somewhere that uses JQuery/a jquery plugin and is running code using eval which contains a syntax error in it, which is why it appears to come from JQuery itself.
There isn't much more than this to go off im afraid. It might be from ajax. Have a look at your chrome's network tab to see what is being downloaded just before this happens and see if it contains any javascript.
If it contains HTML when it should contain javascript check your Meteor paths, Meteor does not throw 404 errors, instead it serves out the main page's html, which may be why the error displays this way instead of a 404
I just came across the similar "afterFlush" error, and while my error was also rooted in a jQuery/plugin with Meteor, it had nothing to do with eval.
The issue circled back around to updating the DOM at the same time I was updating a reactive method, where Meteor was also updating the DOM reactively. I found this out, and removed the manual DOM manipulation, which made this error go away. Hope someone else finds this helpful...
this plugin is showing following error :
"Warning: preg_match() [function.preg-match]: Compilation failed: missing terminating ] for character class at offset 4"
I tried to solve it by adding \ at fourth offset, error was removed but now plugin is not working properly.
What is the full error message? There should be a particular php file at the end of the error.
There's probably an error in your permalink structure, or if you added some type of permalink plugin. Or you're probably getting that error because your blog has no content. It also could mean that you're using an older version of the plugin. Again, it's difficult to say without the entire error message, and what php file is causing the problem. But you can try changing this:
Code: Select all
if (preg_match("/$bad/i", strtolower($comments))){$allow = false;}
to this:
Code: Select all
if (#preg_match("/$bad/i", strtolower($comments))){$allow = false;}