Hi I'm trying to use this plugin for upload multiple images with vue.js. Here is my code.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>vue-upload-multiple-image</title>
</head>
<body>
<div id="my-strictly-unique-vue-upload-multiple-image" style="display: flex; justify-content: center;">
<vue-upload-multiple-image
#upload-success="uploadImageSuccess"
#before-remove="beforeRemove"
#edit-image="editImage"
#data-change="dataChange"
:data-images="images"
></vue-upload-multiple-image>
</div>
<script src="./dist/vue-upload-multiple-image.js"></script>
</body>
</html>
Unfortunately this code neither gives error nor output. But when I use this cdn it works.
<script src="https://unpkg.com/vue-upload-multiple-image#1.0.2/dist/vue-upload-multiple-image.js"></script>
Is there a way to use it without the cdn?. Js file is there and I downloaded it from cdn.
Thanks
The origin of the script should not normally change anything.
Do you use the same version of the plugin? To be sure, you can copy the content of the https://unpkg.com/vue-upload-multiple-image#1.0.2/dist/vue-upload-multiple-image.js into your file (right click, save as...).
Is it added to the page? Do you have a plugin like Adblock and does it inform you that it has blocked content? Open your network console and check that the file is downloaded correctly without error (you will see a line with the filename). Did you see the JS code from the network console when you click on the line (to prevent bad serveur configuration)?.
To be sure, you can add something at the end of the script file :
let myTestVar = "JESuisLA";
And verify you can access to myTestVar on the console.
Related
When I open live preview in brackets the page comes up but never finishes loading. Live preview has worked fine while working on HTML and CSS files, but now that I'm incorporating Javascript I am having this issue.
I have re-installed the program twice with no success, restarted my computer, tried running live preview while all extensions were disabled, and have searched through numerous pages on google on how to fix this issue with no solution.
Also it seems that adding the "script" tag (sourced to my javascript file) is causing the issue. When I run live preview without the tag it loads fine.
This has been an issue for some time so any guidance would be GREATLY appreciated. Thanks!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Section 2: JavaScript Language Basics</title>
</head>
<body>
<h1>Section 2: JavaScript Language Basics</h1>
<script src="script.js"></script>
</body>
</html>
I've emptied the Javascript file in an attempt to identify the problem. As stated earlier this code alone would have live preview loading non-stop.
Please let me know if anymore information is needed. Thanks again!
I think it has to something with the directory like which folders you placed it in for example if the .js file is at the same place as the index.html then what you've done should work.
if not it's in, for example, a folder called "js" then use something like
<script src="../js/script.js"></script>
play around with
../
or
./
because I can't tell without seeing your file structure I can't really know what's happening.
hi am trying to create an external link for a java script program i created and i tried using https://www.000webhost.com but they blocked me, so pleases is there any better way i can do this, plus am still a learner in programming,
here is the code i created and i want it to be linked,
document.body.appendChild(document.createElement('script')).src='https://usscript1.000webhostapp.com/example1';
EDIT:
For hosting the JS source file on some external server for testing you can use sites like http://yourjavascript.com
You can search for more alternatives on Google but this one worked well for me :)
Original Answer:
As others pointed out in comments, you can simply put the source url of JavaScript program in src attribute of <script> tag...
<html>
<head>
<script src="https://usscript1.000webhostapp.com/example1.js"></script>
</head>
<body>...your website's body here...</body>
</html>
Regarding the blocking issue, make sure your src link to the JavaScript file is correct (by opening the link in seperate browser tab or have look at the console in inspect page window for any errors).
You can put the script on the same site and link to it as,
<html>
<head>
<script src="/example1.js"></script>
</head>
<body>...your website's body here...</body>
</html>
If you are facing issues with putting the file on your site, you can directly put the code of JavaScript program inside <script> tag like this...
<html>
<head>
<script>
...your JS program goes here...
</script>
</head>
<body>...your website's body here...</body>
</html>
I am trying to implement a little code in HTML; calling a PHP onclick in HTML using the solution here and it just runs to a blank page. Upon inspection, I noticed a typo in my code but after i corrected it the output is still the same i.e. it opens a blank page with no echo or anything.
My question: Is there a way to debug my code so my browser (i suspect) can notify me as to what part or line of my code the error is coming from, like in Java IDEs?
<?php
function working(){
echo 'WORKED ';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dice Game</title>
</head>
<body>
<div>
<div>
<h1 id="player1" onclick="document.write('<?php working(); ?>')">
ENTER PLAYER 1 NAME
</h1>
</div>
</div>
</body>
</html>
Note: I use Chrome
You are "implementing a little code in HTML; calling a PHP onclick in HTML"
Firstly if your are using a php code in html, So extension of file should .php and there should be a server(ex. wamp,xamp,lamp) to run it. if it having extension .html then it will not show any error, because html files is compiled at browser lever and php is server side language. So if make right extension of your file means make ext .php then run you file, then if there will be any error then you will got message on browser also hinting line number of error.
Browsers like Firefox, Chrome, etc. have Developer Tools. Hit F12 to activate it and then look at Console, then reload the page. That should tell you what your errors are.
On Chrome or Firefox use F12 to Debug (Window) or simply right click any in page select Inspect Elements then choose Console tabs
My requirement is to make a link or a button, on clicking it should open a specified location on my computer and I cannot use jquery but I can use javascript.
I tried doing with input tag by coding as below, but did not meet the requirements.
<html>
<head>
...
<meta charset="ISO-8859-1">
<title>Conversion Successful</title>
<link href="xml.css" type="text/css" rel="Stylesheet">
</head>
<body>
<h1 class=heading_position>Conversion Completed Successfully</h1>
<div class="box">
<input readonly="readonly" type="file" value="D:/Office/xmlautomation/">
</div>
</body>
</html>
I'm a beginner in html still figuring out how stuff works. Thanks
This used to be possible in internet explorer (6 and earlier) assuming you didn't care much about controlling how the document/location was opened.
It is no longer possible in IE or any other browser I'm aware of (Chrome/FF) for security reasons (would you want a random site you visited to be able to launch folders/apps on your desktop?).
For the record, the old syntax would've been file://[Host]/D:/Office/xmlautomation/ where [Host] was usually blank so something like...
Office Automation
would've opened the directory in question.
NB: These Urls will still work if they're listed in a file that wasn't retrieved over the web (eg if you drag-and-drop an html file from your computer onto your browser, links like these should work). This is so that local html files which reference each other can be opened without a web server.
You can use the javascript also.
Just tried, it work fine for me as long as C$ is shared.
<html>
<body>
<input onclick="CallMe()" value="ABX" />
<script>
function CallMe() {
// alert('test');
window.open("file://smewara/C$");
}
</script>
</body>
</html>
This should help you out: HTML/JS open a window to the C$ drive
Should be a really quick one for you pro's:
I'm learning to use JS, in particular a plugin called (embarassingly) 'Easy Image'.
http://cssglobe.com/post/3783/jquery-plugin-easy-image-or-content-slider
Here's my code:
http://jsfiddle.net/tomperkins/LnES6/
JS files are from here:
http://cssglobe.com/post/3783/jquery-plugin-easy-image-or-content-slider
And obviously jQuery (1.5)
I've stripped it down to the basics and can't figure out why it's not working.
Any tips are much appreciated!
Thanks in advance,
Tom
jquery.js and easySlider.js gets an Server error 500 when the browser tries to load them from
http://customstudiodevelopment.co.uk/jquery-test/
Verify that the files are there and that they can be loaded
http://customstudiodevelopment.co.uk/js/jquery.js
http://customstudiodevelopment.co.uk/js/easySlider.js
Unless both these urls load the right JS files your code will not work ...
As a general tip, get FireBug addon to firefox, with the Net panel I found this error in less than 30 seconds ;)
In menu on the left you have to set your framework to JQuery and in Add resources box add 'Easy Image' script. Then comment out first two <script> tags (you will need them on your site but not on jsFiddle). Also change src attributes in <img> tags to absolute path because there is no images folder nor any images on jsFiddle site.
Edit
This is what you get with <script> tags on your site:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2<html><head>
3<title>500 Internal Server Error</title>
4</head><body>
5<h1>Internal Server Error</h1>
6<p>The server encountered an internal error
Script doesn't work because there are no scripts on your site (both links are dead).
This is working:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<base href="http://customstudiodevelopment.co.uk"/>
<script type="text/javascript" src="/jquery-test/js/jquery.js"></script>
<script type="text/javascript" src="/jquery-test/js/easySlider.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#slider").easySlider();
});
</script>
<meta charset="utf-8">
<title>jQuery Gallery Test</title>
<link href="/jquery-test/css/style.css" rel="stylesheet" type="text/css" media="all">
</head>
<body>
<div id="slider">
<ul>
<li><img src="/jquery-test/images/Website-Strip_Future.png"></li>
<li><img src="/jquery-test/images/SR-Toomer_small.png"></li>
</ul>
</div>
<!-- /end #slider -->
</body>
</html>
Note, I put the base element in there to test on my desktop. It's not required for it to work on your server, but if it's on your desktop computer, it should work (so you can copy the html into a Notepad file and save with filetype .html and run it locally to test).
It appears as if your file includes (js/css/image) are not pointing to where you want them to be.
Use Firebug to test these types of things. When you open the console, you can inspect the scripts included, including open each included file. In this way, you can doublecheck to make sure the browser is able to get to your included files.
http://getfirebug.com/
http://getfirebug.com/wiki/index.php/Script_Panel
http://getfirebug.com/wiki/index.php/File:Script_Panel.png <<< see del-linkrolls.js close to top, right; that's where you select which file to inspect
When I loaded the page I got an ".ready() is not a function" which would mean you are not loading jQuery. Then again I've never fooled around with jsfiddle