How to load my JavaScript file in my HTML page (bug)? [closed] - javascript

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I have a HTML page with : <script scr="myJavaScriptFile.js"></script>,
and a javascript file named myJavaScriptFile.js (in the same folder).
My problem : the javascript don't work because the file is not loaded I think. The "sources" tab of google chrome tool for inspect elements show me NOT my .js file.
I have other pages with script which work well so I don't know what is the problem.

It's a misspelling, it should be src, not scr:
<script src="myJavaScriptFile.js"></script>
^^^

Just a typo in your code:
<script src="myJavaScriptFile.js"></script>

Related

load file javascript not working in html code [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
Here i want to load javascript in html code :
Html file in folder:
web/index.html
Javascript file in folder:
web/assets/script.js
Html load script code :
<script type="type/javascript" href="assets/script.js">
You can't load script with href, try with this code :
<script type="text/javascript" src="assets/script.js"></script>

Unable to require local file ( node.js ) [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I am for some mysterious reason unable to require my local file. I have tried reinstalling node.js and moving the file to a different directory with no luck. What am I doing wrong?
My file structure
My index.js file
Looks like the ./YouTubeNotifier/yeet.js should be replaced as ./YoutubeNotifier/yeet.js. This should fix the issue.
Bonus tip - How do the program search for the files?
It checks node_modules folder - require('some-library');
It checks the path - require('./YoutubeNotifier/yeet.js');

Some problems no longer generate console messages, but are surfaced in the issues tab. Click to view page 1 error [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
My console showed this message today. In my console, no error is described, but i still see that red flag, why?
Im using electron, electron client, and gulp
Looks like you have filtered the chrome console. Click on the console sidebar & change the filter

validator.js bootstrap works but show not a function error [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I have ajax form as on modal window. I want to validate the fields and i have followed the following tutorial. and Add the validator.js script into my project.
event.preventDefault();
//$('#myOrderDetailsForm').validator();
$('#myOrderDetailsForm').validator('validate')();
Here is what am seeing :
So wired .
Instead of this:
$('#myOrderDetailsForm').validator('validate')();
Use following:
$('#myOrderDetailsForm').validator('validate'); //removed ()

Setting cookie from a JavaScript file on another domain [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I have a site on domainA.com. It includes file.js from domainB.com:
<script type="text/javascript" src="http://www.domainB.com/file.js"></script>
In file.js, I want to be able to set a cookie for domainA.com. How would I do this? It must be possible since Google Analytics does it for their __utma, etc. cookies.
I'm an idiot--apparently, this isn't actually a cross domain cookie and you can set it using document.cookie='blah'.

Categories

Resources