I am unable to input download link in html - html

I am receiving the error "Failed- No file" whenever I tried to click the download button. Here is the code below:
<a class="btn-ghost" href="Resume/cover letter.pdf" download>Download resume</a>
is there anything I can do to rectify the error?

<a class="btn-ghost" download href="Resume/cover letter.pdf" download>Download resume</a>
You can try this one also and again check the path you have given to the href, if the path is correct then this will gonna run, i have tried it.

Related

Download button not working, file not found

I'm trying to place a button that, when clicked, downloads the file aaa.txt.
I have that file on the same folder as my index.html.
I've tried this:
<a href="aaa.txt" download>aaa</a>
<a target="_blank" href="aaa.txt" download>aaa</a>
aaa
But none seem to work. When clicked, chrome downloads a aaa.htm and says "error:file not found"
Also, I'm on a private server, not just running the html file.
It is quite simple you just need to specify the route more accurately, by adding a forward slash "/" before aaa.txt
<a href="/aaa.txt" download>aaa</a>
for more info, you can refer w3school
It deepens from where you generate the link:
/ = root of the current app (/);
./ = current directory (/subfolder/subfolder/);
../ = parent of the current directory (/parentFolder/).
Means if you have only a index.html file in root then you need only /filename.ext. In your case:
aaa

How to make a pdf download on a button click with react?

This is what I've tried:
<button className="button">
<a
className="button"
href="../assets/Resume/ResumeOfficial.pdf"
download
>
Download Resume
</a>
</button>
It does try to download but it cannot find the file, yet I'm sure (like 99% unless I made some dumb mistake) that the address is correct.
<button className="button">
<a className="button" href="../assets/Resume/ResumeOfficial.pdf" download = "ResumeOfficial.pdf">
Download Resume
</a>
</button>
so this should solve your problem, generally for downloading .pdf always double check
Download
You can import same file in some variable and then you can use that variable in href it might work.
find below example:
<a href="variable_name" download>

use a class instead of id in a link

Is it possible to make a link that would normally go to an id:
<a href="http://example.com/page#someid">
instead go to a class:
<a href="http://example.com/page.someclass">
Would the page scroll wildly up and down, trying to reach all the elements with that class, or would it just do nothing?
It would do nothing, except look for a file called "page.someclass" at the server and most probably yield a 404. Please refer to the URL spec because you're wildly confusing CSS selectors with the 'hash' part of the URL.
Why don't just try it?
JS FIDDLE DEMO
If you are using a class als anchor link, your browser tries to open it as url, like in the example named above index.content. Because he is not able to find it, you will receive an 404 not found or 403 forbidden error.

Share link via twitter not work

This is my implementation of tweet button
<a href="https://twitter.com/share?url=generated_url"
class="twitter-share-button"
data-text="Hi, you can see my presentation on this link">Tweet
</a>
There is something like list of presentations and every one has tweet button and itself generated url to share.
It working well, post tweet like I want - text and url. But, when I tweet via this button, link on twitter is unclickable. What is wrong?
EDIT:
unclickable - showed as plain text, example screenshot:
The code is correct, but the links with "localhost" are not clickable.
I had the same problem until I tested with a "live/public" link.
Your generated_url should not contain localhost, but http ://www . yoursite . com / data
I think this page on the twitter dev docs and this question can help a lot. For what i found there, it would be something like this:
<a href="https://twitter.com/share"
class="twitter-share-button"
data-lang="en"
data-url="http://this.url.com/foo/bar">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

How to use HTML to do a Skype call?

I tried to insert the following snippet in my script. By clicking the link it should do a call to a Skype account. I've been looking for hours now, but can't figure out why it doesn't work.
<pre><code><a href="callTo://USERNAME"><img src="http://goodies.skype.com/graphics/skypeme_btn_small_green.gif" border=0></a></code></pre>
Is it accepted in any way or do I miss something here?
Try "callto" (with no uppercase letters).
Link will initiate Skype to call my number!
<a href="skype:********?call">Link will initiate Skype
to call my Skype username!</a>
source: http://geek.michaelgrace.org/2010/03/create-html-link-that-starts-a-skype-call/
I have been fighting with the following link all day.
Start chat
The problem that I had was with the USERNAME part
Finally, I just solved it.
My name on Skype web page was name but the real name was name lastname. The link in my web page did make Skype to load in my Android phone but, Skype failed to find the account to wich I wanted to call (name lastname).
I tryed, and failed:
<a href="skype:name lastname?call">...
<a href="skype:name+lastname?call">...
<a href="skype:name%20lastname?call">...
<a href="skype:name-lastname?call">...
<a href="skype:name_lastname?call">...
<a href="skype:phonenumber?call">...
Then, the solution:
<a href="skype:live:emailnamewithoutdomain?call">...
I just hope u find it usefull.
And, do not forget that u have a plenty of commands to add after the ? in the url (add,call,chat,and so on).
Just for another option from their official website:
https://www.skype.com/en/developer/create-contactme-buttons
It's nice and easy to use, can be used both for chat or/and call.