Relative Link To Local File - html

I have a local HTML file that we are using as a USB Menu - when the USB device is plugged in the webpage will automatically open and show our menu.
In our menu we have a link to our installer. When the user clicks the link it opens our installer window.
The code is:
Install Our Plugins
The link works fine but we want to make the link to the file relative. Ie, make it;
Install Our Plugins
But when I change this the file no longer opens when I click the link. Any ideas what I am doing wrong? Is it possible to have relative paths for files?
The folder structure is like so:
- Root USB
- AUTORUN.html
- src
- Company Plugins.exe

I think you just want to remove the prefix scheme. Try:
Install Our Plugins
You could also try a . operator to signify the current directory:
Install Our Plugins

Related

How to create an OS Agnostic HTML link with ":" (colon) in the local URL?

I have a HTML file (index.html) that I want to insert a local link to. The link location relative to index.html is "folder/link:A.jpg".
This link will be accessed by both MacOS users and Windows Users. How can I create this link in a way that the ":" symbol is properly processed by both OS's?
I can't use the colon HTML tag, that link is broken in both systems, only works on my linux testing VM.
I can copy how the path is encoded in Windows into the link, but then that link is broken on MacOS, and the same thing if I copy the link from MacOS, it will be broken on Windows.
Unfortunately I have other software that uses the exact format of "link:A.jpg" as input, so changing the colon in the image is not an option.
Is there a way I can dynamically code the colon so it will show up as it natively does in either system?

Set default path to check for reference links

I am a user of PHP-Storm and have been using it for years, the only issue I have ever had is the fact that phpstorm always tells me I am missing my reference links when I try to reference images, css styles, fonts, ect. I have looked for a way to set the default path for them but I can only ever find things related to document roots server sided.
My situation:
My root path on server for nginx: /var/www/html/app/vg/public
PHPSTORM deployment path: /var/www/html/app/vg
PHPSTORM local path: C:\Users\A\PhpstormProjects\VG Official Zend
The reason that looks weird is because I am using zend-framework-2
So a reference that works in the code looks like this: (ignore live links)
Mark parent folder of the /salute/ folder as Resource Root.
This can be done via
context menu in Project View panel
Settings/Preferences | Project | Directories
As for "live links" -- place caret there, Alt + Enter and choose Download Library -- IDE will download that file locally and will make new JavaScript library for it.
If you do not want to download them then I may suggest to just disable that particular inspection (same Alt + Enter but instead using Enter on "Download Library" item use Arrow Right (or expand sub menu with mouse) and go from there with the right option.

Brackets - Live Preview not working

I found this awesome program(html editor) called Brackets and it's by Adobe.
Now reason why i got the editor was because i wanted to Live Preview PHP code, but i found out later that i needed a Wamp Server.
Now, i was in the mood of making an about page but i couldn't live preview. Live Preview Base URL is empty, and when i try to live preview, i get this: > http://puu.sh/aDkET/4209ec1192.png < and the lightning bolt is half orange(i heard it needs to be red to work). I have tried the lot... Entering as Live Preview Base URL to http(semicolon)//localhost:(insertporthere)/ <-- Wamp Server, tried only localhost, left it empty, I don't know how to make this work.. I am stuck and i basically need real preview..
Please, please help me! D: I have searched the internet looking for solutions, but no. If you can, a step-by-step tutorial would be much appreciated :)
Kind regards,
- PiguFilms
The Live Preview "Base URL" is the localhost URL that corresponds to the root folder of your project. Brackets uses this to map from a local path on disk to the server URL which serves up that same file: it takes the HTML file's path relative to the project root, appends that relative path onto the Base URL, and then launches the resulting full URL in Chrome.
So, for example:
If your page is at http://localhost/myapp/page.php and the page.php file is in a "myapp" subfolder of your project, your base URL is just http://localhost/.
If your page is at http://localhost/myapp/page.php and the page.php file is in the root of your project, your base URL is http://localhost/myapp/ (this way the path is "/page.php" relative to both bases).
If you think you have the Base URL set correctly but it's still not working, try going to the same URL manually in your browser to make sure your server is operating correctly.
More details on using Live Preview with your own local server can be found here: https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#lp-custom-server.
although #ytpete's answer is the right choice for your problem but you need to do, as i say, first. In simple words, go to file(in Brackets), click open folder and now make the project directory exactly same as your local host server for php files i.e. C:\Program Files\Ampps\www\phpFiles (i am using Ampps and here 'phpFiles' is a subfolder inside which relies my php file and also html file too). Now you can follow steps shown by ytpete and you are set to live preview of your php file.
I had this problem as well. What I did was simply goto File->Open Folder... it all worked after all the necessary files were loaded into Brackets.
If you are using windows try running brackets "As administrator", worked for me
I had this same issue once I installed Xampp. This video resolved it for me. Essentially just select, File > 'Enable Experimental Live Preview' should have a check mark.
Make sure you don't have an internet bandwidth limiter (such as NetLimiter) running while using Brackets' Live preview.
I have just fixed this issue for myself, I had 'Experimental Live Preview' ticked under file. I unticked it and now it accepts my 'http://localhost/mywebsite' URL when I go to live preview.
This worked for me. I restarted my system and then unchecked "enable experimental live preview" in file.
this worked for me, and i don't remember where i saw it, but go to : cd $HOME/.local/share/applications and delete everything chrome related.
This worked for me, and i didn't dare to use live preview again.
On Ubuntu 16.04 LTS and Chrome Version 61.0.3163.100 (Official Build) (64-bit)
Put your files in the same folder where you have index.html file
I have selected the option called "reload with extension" from Bracket's debug menu and that resolved live preview issue. More details can be found here.
For everyone, this problem can be resolved by following steps:-
On menu bar, go to File --> Open Folder (folder which have your html file for live preview)
Select Folder
Select your html file from left side bar for live preview
Click on bolt icon on right (preview button)
All it melts down to the fact, that you need that folder(which have your file) selected to view your output in live preview.
Let me know, if it helps someone. :)
It is because it doesn't find the 'html' file. Live preview basically needs html file to run it .In my case, I have a project made in php , my file name is index.php,I renamed it to index.html and it works like charm :)

Mac - Local Html - link to a hidden folder not working

I have to create a DVD containing a static HTML document referring to other documents stored in sub folders. I want the Html file to be visible, but the sub folders being hidden on each OS (Word, mac, Linux).
I have organised the like this :
list.html
.styles\ (folder containing multiple CSS files)
.datas\ (folder with 200 documents accessible from the page "list.html")
Styles and datas have the attribute hidden activated on Windows. The "." at the beginning of the name of the folder allows to hide them on Mac and Linux.
The dvd works perfectly on windows: folders are well hidden and the html document is well formatted and links to others documents work like a charm.
Problem : on Mac, the html is not formatted and links to documents are all dead. Mac browsers (Safari and Firefox) seem to be unable to access the hidden folders.
Links are relative, and fully working on windows.
Is there any way to link to a folder hidden by a dot on mac ? Any idea ?
Thanks you very much, and sorry for my poor english !
I think you can't do it the way you try. If you rely on the underlying OS to decide what is hidden and what not, you lose the control.
Try using a out-of-the-box xampp server like http://www.server2go-web.de or http://sourceforge.net/projects/servcd/ (newer) or http://www.stunnix.com/prod/aws/overview.shtml (also on linux and else) to run from the DVD. And then create a .htaccess file with an directive to allow hidden files like this.
<Files .*>
Order Deny,Allow
Allow from All
</Files>
Or maybe just rename the folders without the leading .

Chrome's "Auto-Reload Generated CSS" not reloading page when SASS recompiles CSS

I'm trying to get Chrome's DevTools to auto reload a page when I save a watched SCSS file which will compile and make changes to the CSS file.
I have the Auto-reload generated CSS option checked, but sadly, it isn't working as expected.
Whenever I make changes to the SCSS file and save it, the page doesn't reload. I have added my working folder to the workspace and also mapped the files (both the SCSS file and the generated CSS) to their respective versions on my local system drive. This, however, doesn't help.
The SASS source maps seems to be working fine as the scss files are reflected in the DevTools inspector:
I'm using Chrome version 31:
Have I missed out anything that I don't know of? What else do I have to do to get this to work?
I used drupal in this case and drupal generate css link like 'style.css?abc'. Problem in this suffix '?abc'. You need to start file mapping from LOCAL (press right-click on local) 'style.css' to WEB 'style.css?abc' (shown in list). Not from WEB to LOCAL. If result is correct WEB-links disappears from list in 'resourses' tab.
here is a good solution, to avoid this mapping issue of .css?201203241721 / .js?201203241721-files as szdv mentioned with drupal. I have had it with typo3 and this solved it:
/* remove in production *************************************************/
//filter typo3 temp file src/href with ?date ending for chrome workspaces
$('script, link').each(function(){
rpString = /\?[0-9]*/;
if(this.src){
this.src = this.src.replace(rpString,'');
}
if(this.href){
this.href = this.href.replace(rpString,'');
}
});
/* ******************** *************************************************/