VB.Net download file with href="#" - javascript

I'd like to download a file via VB.NET.
The problem is that I don't have an explicit link to that file. Inspection of the browser element brings up:
<a href="#" title="//SOMEADRESS.net/Filename.xlsm" onclick="jsf.util.chain(this,event,'return >clickDisable();','SOMETHING\':\'form_files:SOMETHING2\'},\'\')');return false">
I've masked some parts of the link, because I'm not allowed to share.
Can someone help me with that, please?

Related

Download button in react to csv link not working within material-ui table [duplicate]

Why is this not working:
download.html
download
The jsplogin.jar file is in the same folder has the download.html file.
when I click the download link the file jsplogin.jar should download
but its trying to open the file in the browser.
when I right clicked on the link and selected "save link" nothing is happening.
In HTML5, in most browsers you can add a 'download' attribute to the a element.
for example:
<a href="http://www.example.com/index.html" download>Download</a>
Based on this question. How can I create download link in html?
Use the "download" attribute:
<a href="jsplogin.jar" download>download</a>
The download attribute didn't work for me, but this did:
Download
The opens a new tab but downloads the file and closes the tab once it realizes it's not a file type it should render. In my case it was a .csv, I did not test with .jar but i imagine you'd get the same result.

Selenium - button click downloads but doesn't redirect to linked page

I'm trying to click a "Download" button in a pop-up on a webpage. When I click it using Selenium (Chrome; Python), I know it's working because the file gets downloaded.
However, in addition to the javascript that downloads the file, the button has an href=# which should re-direct to the underlying page, (without the pop-up) once it's been clicked. When I click it in a live session using my mouse, the behavior is correct. But when using [button].click() in Selenium, the redirection is not happening - only the file download. Any tips or suggestions?
Edit: code snippets
Here is the button html:
<div class="buttons popup__buttons">
<a href="#" class="button js-downloadLink">
Download
</a>
</div>
And my selenium code:
driver.find_element_by_class_name('button.js-downloadLink').click()
My suggest is to open chrome dev-tools and investigate what action is triggered by javascript. You may need to run a function with selenium that for some reason is not calling when using Selenium or check if the ids are loading properly.
if you want help share the website you want to scrape and we can have a look.
Every website is a new world! Hope it helps.
EDIT:
Still no idea with your snippet. Try the devtool. More precisely to the event listeners where its says click():

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

How to force chrome to download files not opening them?

I am using window.location.href="link.mp4" in a userscript in chrome tampermonkey but rather than starting the download chrome is opening the file and starts playing it. I have a file link in a variable and i also use idm if there's any way to trigger the through idm.
Did you try download attribute ?
Example Download file when clicking on the link (instead of navigating
to the file):
<a href="/images/myw3schoolsimage.jpg" download>
http://www.w3schools.com/tags/att_a_download.asp
Try the HTML5 download attribute
<a href="myfile" download>click to download</a>
This opens a "save as" dialog regardless of file type.
The download attribute specifies that the target will be downloaded when a user clicks on the hyperlink.
<a href="filename.mp4" download>Download File</a>
Try working JSfiddle https://jsfiddle.net/balaji_mitkari/xpu9yrug/

Download a URL as a Text File

This is my script
<a name="pack,1,SER_260,NZ vs SL Series,,,yes,PITEM_233,PDATA_234,no" href="javascript:void(0);" onclick="playLink(this);" style="text-decoration:none;">NZ vs SL Series</a>
In this moment when I click on this link it opened rtmp link like this
rtsp://10.62.230.21:554/livefeed/SLVSNZ_QVGA.sdp?msd=94775447908&pi=&pd=&sn=NZvsSLSeries&b=3G&os=WAP&cn=&m=GT-I9505&mcc=&mnc=&v=1.14&lac=&cid=&op=Dialog&st=1&sid=&pid=#00INY0091&stamp=3659098938&sign=a308650741b841c2add44629c15d0ec1
The thing I want to do is not open the link the thing that I want to do is save this URL as a text File or m3u File.Please help me guys.I would be happy to have a example here because I'm not a genius in this field and Any other idea and solutions will be accepted.The only thing that I want to do is saving or showing the URL not opening .Thank You.

Categories