For some reason, I cannot get to set up my index page without having loads of trouble.
Here's my browser:
And here's my index:
I've got really no clue this time.
He doesn't want to load a local script, yes it points towards it :)
As per your project structure your src path is wrong you have to set it as a src="../../node_modules/Your remaining path" so you have to go 2 level in up direction for get your file.
Related
I have some issues rising up displaying Image files from local filesystem.
And to say it before: yes i am aware of the security breach this is causing and there is no other way playing it different because my company has no file Server yet to serve these images in a proper way.
With that out of the way the scenario:
I have an angular app which should show me some Images on my page. I wrote a directive called Gallery to do so.
Into this gallery I am handing in the absolute paths to my Image files and just set the src attribute via javascript. I tested it with some random chosen files picked from Google and everything worked out well. Allthough my browser is throwing out error because of security the picutres were displayed.
But when i got the real data from my company collegue Things started getting nasty. The error still thrown in console but nothing was displayed. I checked first overwriting the img.onload listener finding out that the testimages are giving me the Output i put onto the listener, my real data images didn't.
Next I tried to set the background attribute and not the src one. My test images were displayed the real data ONLY if it is placed into the assets folder of my app. This got me quite confused because like mentioned above using my test images it doesn't matter where they are placed, they are displayed everytime.
I also tried changing file format from png to jpg but nothing happens.
Also scaling down the images (real data has big px solutions) didn't work either.
So my question is simple ...what am i doing wrong? Could it be possible that those real data images are not exported properly. But if that's the case, why do they work in the assets folder? Like mentioned security block is not possible because my test pictures a doing well.
Finally I found the bug which was responsible for the behaviour ... It was no wrong linking it was the IIS Express which was caching old links. #mrunion and #cloned links to filesystem are still working on IE and also in Edge just for devs which have no other choice then to do it that way
Cheers Max
I am making a magento webshop, but i have run into some problems with the theme i am using.
I bought it on themeforest, and i have asked the developer for help, but it takes ages for them to answer and come with a real solution to fix the problems, so now i am seeing if someone here can help me solve the problem.
The webshop: http://new.webhipster.dk/index.php/home-left
When i add items to basket ("Læg i kurv"), it only works on the front page (the link listed above). When i go to another page, it won't add the item to basket. (e.g. http://new.webhipster.dk/index.php/roedvin.html)
So my guess is that there is a corrupt js file, but what i don't understand is, that it is the same code which is generated in header on both pages - but still it doesn't work on any other page but the frontpage.
How do i figure out what js file is corrupt and isn't loaded properly?
I have gone trough each one to see if they load, and it seems like they all load exactly like they do on the frontpage.
I guess you are missing a library required for it or might be css. As error in your console window say that it could not found css property.
Because when I tried accessing url directly from browser it's adding items into cart
For Example you are calling -
setLocation('http://new.webhipster.dk/index.php/checkout/cart/add/uenc/aHR0cDovL25ldy53ZWJoaXBzdGVyLmRrL2luZGV4LnBocC9ob21lLWxlZnQ,/product/2/form_key/1Tfx79G6V33Q7l2Q/')
Now try accessing it from the url something like
http://new.webhipster.dk/index.php/checkout/cart/add/uenc/aHR0cDovL25ldy53ZWJoaXBzdGVyLmRrL2luZGV4LnBocC9ob21lLWxlZnQ,/product/2/form_key/1Tfx79G6V33Q7l2Q/
and this will add item in your cart.
Now you debugging should start from function setLocation(). Try doing file search for setLocation function. and check where it is failing.
Hope this will help you atleast for debugging.
I am busy building a small gallery that is pulled from my local file system. I have an element that gets the directory:
<input type="file" webkitdirectory>
I then display all the images and videos in that directory on the page in a container.
At the moment for security reasons I only have access to the relative path so I had to add a hardcoded e:/downloads for it to find the files when I display them because the location of the file is on my desktop.
I want to extend this so I can choose a directory from anywhere on my local file system, but I need the aboslute path. Currently only IE gets me the absolute path, chrome returns a fakepath. I know how to get to the settings to allow local file system files to be included in IE, but I don't know how to enable it in Chrome. I would like to know if there is an option to allow this like in IE.
I have done searches around and most people say it is not possible, however I believe there must be a setting somewhere, I am hoping someone knows.
Here is my code just for kicks if you want to have a look:
https://jsfiddle.net/3mp1znx9/
Please note because it is hardcoded to e:/downloads you might want to change it to make it work for you.
You can open up the console and run the function called GetDirectory if you want to see the absolute path it tries to return. (you should also comment out the removal of the element after it has changed as well)
I hope my question was clear and not too long. Thank you.
Summary:
I want to access the absolute path of my local files from the element within Chrome. I can already do it in IE.
I finally found a solution to my own problem. It is nearly impossible to get the absolute path with Chrome, it only works with Internet Explorer.
So the solution is to use the temporary path.
URL.createObjectURL(e.target.files[0])
This is what was needed, I then use this as the src. I hope this will help someone else when they stumble upon this one day.
I'm new to js, and I'm playing about with a for loop that places images into a #div using .append()
totalSlides is a dynamic int and can change, I want to display the same amount of images as the number of totalSlides.
I'm pretty sure the for loop logic is correct, but for some reason the images are not displaying. When i inspect in firebug i get the error "failed to load given url". I know that that url is correct, i have even tried the full url path C:/complete/folder/path etc..
I'm sure it's an easy fix that i should get but for now i just can't see why it won't load my images.
for(i=0;i<totalSlides;i++){ // Loads all number images into html
$('#numbers').append("<img src='images/numbers/number"+i+".png'/>");
};
Thanks in advance.
Jase
One reason might be if the JavaScript is located in other folder (e.g. /js/myfile.js) then the relative path will fail since it will look for the images folder inside the JS folder.
Try giving path starting from the root:
$('#numbers').append("<img src='/images/numbers/number"+i+".png'/>");
(Note the added "/" in the beggining of the image source)
I have tried to place the slider on every page on this website: http://atripathi.com
It works on the homepage, but doesn't work on any of the other pages (About, Services, etc.)
I know it's probably an easy fix, but I can't get it at the moment.
Thank you for any help or suggestions!
Looks like the original suggestion above is correct. I'm seeing slider javascript includes at the top of your homepage that aren't on the other pages.
Generally, a good way of troubleshooting is to make copies of both pages, index-c.php and about-c.php perhaps, and start removing everything that isn't pertinent to the trouble you're having (other HTML, css includes, etc.) until you get down to only the slider on the page. Once you've done that, you might notice that the one page is slightly different than the other, making it work. You can copy back and forth until it does.
The other possibility is that there's a relative path problem somewhere, because your one page is inside a folder (though I'm guessing you have a .htaccess redirect to a root folder page)? So if all else fails, move the reduced about-c.php to the root folder and see if that then works. If so, you know it's a path problem.
Hope these suggestions help.
I see that jQuery is being included on all your pages but the cycle plugin is only included on the home page. You should be able to update your template(s) to fix this.