Error when trigger download image on bootstrap button - html

I have a button that I want if user click the button, user will download an image directly.
Here's the code
<a href="/path_to_image/" class="btn btn-xl btn-info btn-full-width" role="button" aria-pressed="true" style="margin-left:10px; width: 50px;" data-toggle="tooltip" data-placement="top" title="Download Image" download>
<i class="fi-br-download" style="display:contents; text-align:center;font-size:1rem"></i>
</a>
The problem is when user click the button, the image is not download, but only show the image on browser.
Is there any solution ?

download only works for same-origin URLs, or the blob: and data: schemes.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

Related

Responsive web design ccs button works in desktop view but not any reaction with mobile view

support me for set link on the button that works in both responsive mode.
<button type="submit" class="btn btn-primary btn-learn">Get now <i class="icon-arrow-right3"></i></button>
I tried this also..
<p><a class="btn btn-primary btn-learn">send Request <i class="icon-arrow-right3"></i></a></p>
in this original code where i should include link
If you are asking how to add a link, in the second piece of code add an href parameter, like so:
<p>send Request <i class="icon-arrow-right3"></i></p>

Can I have hover and click in Bootstrap JS Popover?

I am using Bootstrap Popover plugin: https://www.w3schools.com/bootstrap/bootstrap_popover.asp
I've been asked to make both hover and click works. But I can't set two values in the data-trigger attribute.
<a tabindex="0" role="button" data-toggle="popover" data-trigger="popover"
data-placement="top" title="Click and Hover!"
data-content="<b> Click and Hover works! </b>" data-html="true">
Click or hover here
</a>
How do I make both the Hover / Click work?
you can specify multiple triggers simply by separate them by a space like this :
<a href="#" data-toggle="popover" title="Popover Header"
data-trigger="click hover"
data-content="Some content inside the popover">Toggle popover</a>

button a href link not linking to page but disappearing instead

I am new to programming and just trying to get a simple button to link to google. However it seems every time I press it, it disappears. Any help would be great.
Below I have put my simple button using Boostrap, I just used the button and added an href to link to google with an i class of fa-edit,
<a href="https://www.google.se" class="btn btn-danger">
<i class="fa fa-edit fa-fw"></i>
google
</a>
Fiddle link
I'm sure it's a silly mistake, but any help would be great.
If you add the target attribute it will know to open in a new window I think that is why you are not having any luck making it work in your fiddle.
<a class="btn btn-danger" href="https://www.google.se/"
target="_blank"> <i class="fa fa-edit fa-fw"></i> google</a>

Email Link to open in any Browser and / or Client

I've designed a very basic landing page with a contact button.
I want to make sure that by clicking this button it will open the user's email client or webmail.
Is there a way to verify this or make sure it will work? I use Outlook, so in my computer it works.
This is the code for my button:
<div>
<a class="button-link" href="mailto:contacto#woodtechms.com">
<button type="button" class="contact-button btn btn-lg btn-danger center-block contact-button">Contact us</button>
</a>
</div>
Thank you.

Button class in href tag

When a user clicks the button it has a href to another html page in the same folder as the current page to open.
But I get a 404 error, however it works for external websites.
This is the code:
<a class="btn btn-sample btn-lg" href="next.html">next page</a>
How could I correct this, thanks
use current directory href="./whatever"
<a class="btn btn-sample btn-lg" href="./next.html">next page</a>
<button type="button">
<a class=" *** " href="helloworld.html"/>
link name </a>
</button> // close tag /button