Opening PowerPoint after clicking a html link - javascript

I have a link in my webpage. When someone clicks the link I want to start the PowerPoint application in the user's desktop with an image in the slide. There are too many of such links and so I can not create separate ppt files for each links.
I can do the following with excel.
<a href="http://localhost/excel/asheet.xls#Sheet2!D4">
This link will open the Excel file to the second page with the focus on cell D4
</a>
So is it possible to do something for PowerPoint like this
<a href="http://localhost/template.ppt#image1.jpg">
This link will open PowerPoint with image1.jpg in the slide.
</a>
Or any JavaScript hack will also help.

Related

Delphi: click web page buttons by code to initiate download

I am new to web development so please be patient.
I need to automate downloading a CSV file from an online location service every half hour. I am using Delphi 11.2 and WebView4Delphi. I can navigate to the page, but cannot figure out how to click the button and wait for the response before clicking the next.
I have tried:
WVBrowser.ExecuteScript('document.getElementById("linkRefresh")[0].click()');
...and different variations.
I need to click two buttons:
<a id="linkRefresh"
href="#"
class="tools refresh report-action"
data-action="refreshReport"
data-event="click">
...and:
<a id="linkCSV"
href="#"
class="csv report-action tools"
data-action="exportCsv"
data-event="click">
Then the "Save As" button, give a filename, and finally "Yes" to overwrite the existing file.

HTML video automatically download

I want to use javascript to automatically download a video file given a url that contains the link to the video. So far I have tried the approach of using <a href='somelink' download> but when I click on the link it will open a new tab containing the video instead of downloading it. Is there a way to write a script that automatically does the job that the video tag control options does? Like the picture shown below, can I write javascript to trigger the event on the download button? Thanks.
This might helpful.
document.getElementById("myCheck").click();
<a download="name_of_downloaded_file" href="https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4" id="myCheck"> Clicking on this link will force download the file</a>
Use target=”_blank” along with anchor tag with download option to prevent streaming files directly in browsers on desktop and android or iOS (iPhone) devices.
<a href='somelink' download target=”_blank”>
Here is the reference

iOs download pictures in photos instead of files

I have a website that provides images and I give users the possibility to download them.
There is an issue with the iOs users, the photos that are downloaded thanks to the button I made, go directly to the "Downloads" folder of the iPhone. (See #1)
The only way for the photos to go to the right folder is to make a long click on the photo and click on "Add to Photos". (See #2)
I would like these photos to be downloaded to the photo folder by clicking on the button.
Is there a solution?
#1 / <a href="photo.jpg" download> Download </a>
#2 /
Thank you

HTML hyperlink to a specific page of a pdf file

Consider a very simple link to a pdf file in HTML:
<a target="_blank" href="mypdf.pdf">Link to pdf</a>
Of course, when the user clicks on the link, the pdf is open and the first page is shown in the browser.
Is there a way create a link to a specific page of the pdf? I was wondering if there is some command like this:
<a target="_blank" href="mypdf.pdf#11">Link to page 11 of the pdf</a>
or some trick based on Javascript.
I found answer on adobe forum https://forums.adobe.com/thread/2345594.
After # you should write something like #page=3 for example, to move automatically to page 3.
The following should do the trick
<a target="_blank" href="http://www.exampleurl.com/file.pdf#page=4">
You can also do chapters if needed but this needs a correctly formatted PDF.
Thanks

Showing excel data in web page

I have a webpage that has two links to download pdf and excel files,
<a onclick="window.open('Files/Creditcard.xlsx')" >Clickhere excel</a>
<a onclick="window.open('Files/Creditcard.pdf')" >Clickhere pdf</a>
While clicking on Clickhere pdf it is opening in webpage itself, which is the actual requirement. But coming to Clickhere excel it is downloading instead of showing in webpage. Is it not possible to show the excel in webpage? If we can, please help..
Thanks Inadvance.
Have you tried setting the target of your link?
http://www.w3schools.com/tags/att_a_target.asp
One possible solution i found is, save the excel as a webpage(any how i just want to view the content not to download). So that content can be viewed in the webpage it self..

Categories