I use Muchkin.js enabled in Marketo on my website and somehow getting this error in console - GET https://%20596-oey-331%20.mktoresp.com/webevents/visitWebPage?_mchNc=148758…ard%2F&_mchPc=https%3A&_mchVr=151&_mchHa=&_mchRe=&_mchQp=profile%3Dcreated net::ERR_NAME_NOT_RESOLVED
Any idea what this means and how to fix it? Thanks a lot
it looks like some spaces have crept in to your url in your munchkin code... If you look at the script snippet you pasted in to your template, check if there are any spaces around your instance ID (which would be 596-OEY-331). There shouldn't be any spaces - it should be like Munchkin.init('596-OEY-331') - see if that works!
Related
I have done a microsoft tutorial called Web API with Javascript
I now have a UI made with Javascript and HTML which looks like this:
How do I use the UI? I keep getting a Reference Error. Is there a specific syntax I am supposed to follow when I add and edit something via APIs?
In the future, please copy and paste error messages into your question. I would normally copy and paste the error message in my answer, but I don't want to type it all out :)
The errors (red) mean that you're trying to use JavaScript that is not defined yet. The warnings (yellow) are the reason why.
The second warning says that it could not load the JavaScript. That explains the errors. The first warning might be the reason why. It's saying that the MIME type is empty, when it should be application/javascript.
But you said in the comments that the site.js file is empty when you try to access it directly. Did you save all the JavaScript in step 4 of that tutorial to site.js?
And what are you using as a web server? IIS Express?
I am working on an Angular grid project and i am facing a minor error while using angular-grid.
Heres the error- Module 'angularGrid' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
So i thought i am missing out on something. I checked a JSfiddle and was not able to view the output there. So i checked the console for errors. here also the same error is displayed.
JSfiddle is not even edited by me. I am just viewing the link. Yet i get the same error.
http://jsfiddle.net/9b5gnjf1/8/
<md-toolbar class="md-whiteframe-z2">
<div class="md-toolbar-tools">Toolbar</div>
Just adding the above 2 lines from the link so that stackoverflow lets me paste the jsfiddle link. without any code written, it doesnot allow to post the link here.
anyone knows what kind of error is this and how to solve it ?
There's a 404 error resolving the external link to the javascript file that the angular-grid module lives in.
Looks like either it's a bad link, or the rawgit servers are down.
You can either wait and hope the link comes back to life, or replace the broken external resource with a working one.
I am using the FriendBuy app for a shopify store at this moment and am running into an issue where an illegal token is being caught, aside from that there are no other issues that I can see. What I am trying to do is activate the referral via a text link. I have followed the documentation according to the app to the letter, but after running a javascript validation test on the code a number of errors popped up. I find it hard to believe an expensive app with a huge user base would fail on something simple so the issue must be on my end but I can't seem to discover where. The code creating the issue is
window['friendbuy'].push(['widget', ‘xx-xxx’, {configuration: {share_button:false}}]);
according to the documentation this is what i should use, replacing xxx-xxx with the campaign id. The only inconsistency I can see is that the suggested x's to fill are 5 characters long, where the actual code is 6, but that is what I came up with after following the documentation.
It looks like your javascript has Microsoft quotes around the ‘xx-xxx’. If you change them to 'xx-xxx' it should work.
Corrected example below:
window['friendbuy'].push(['widget', 'xx-xxx', {configuration: {share_button:false}}]);
I'm maintaining this website that accepts multi-line inputs from user and sends the data via JSON. line break \n are decoded and encoded properly but somehow the \r chars are not accepted on the server side and I have the feeling I would need to escape them prior to sending them over. Before making the fix, I want to try to reproduce the issue but I can't find a way to do it !!!!
Do you have any recommendations?
EDIT after more investigation, it turns out that the issue is in IE only ( as in the \r chars get added when copying/pasting to the text input). Hijacking the text area did not change anything in FF or chrome and doing a data.description.replace("\r","") did not solve the issue either. Still poking around.
if you just want to reproduce the error, just add some js to populate the textarea:
document.getElementById('textarea-id').value = 'test\r\ntest';
Chrome's Developer Tool's Javascript Console lets you send JSON to your server using friendly jQuery/MooTools/Protoype syntax
I'm getting the familiar '$ is not defined' error in my JavaScript for the following line in one of my javascript files...
$(document).ready(function() { … }
Normally this is because I've forgotten to include jQuery, but not this time! I have included it, and it is the first include in the page. This error happens in included JavaScript files, and also in any code within tags, all of which come after the jQuery include. It also doesn't happen all the time, maybe half the time when I refresh the page.
I've also used jQuery quite a lot and never seen this before, so I am quite confused.
Edit:
Looking at the Net tab in Firebug, jQuery is being requested and I get a 200 response but nothing is sent back in the response body. If I open the file directly in a new tab or whatever, I get an empty document. Firefox seems to think the file is cached but the data size is 0. Cache control is 'no-cache'. Confused.
Edit 2:
Opened jQuery file in VisualStudio, saved jQuery file with no modifications, everything works perfectly now. Still totally confused.
Are you sure that jQuery is actually being loaded into the browser? It sounds like it really isn't. You should use Firebug or Fiddler to check all the http requests to see if it is actually being downloaded.
Here's a screenshot of how you can check this using Firebug.
Are you using Wordpress or some sort of CMS? If so, their version of jQuery may have of code at the end which calls jQuery.noConflict(). You can read about this method here: http://api.jquery.com/jQuery.noConflict/
This means that whenever you want to use the $ function, you need to use jQuery instead.
For example...
Instead of
$("p").addClass("awesome");
You would do
jQuery("p").addClass("awesome").