• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

HTML Button

I have a webpage with a button on a form, is there a way to when the user clicks on the button it will open up excel and the file located in \\wlls\208\bobby.xls.
0
ASOSWE
Asked:
ASOSWE
  • 2
  • 2
  • 2
  • +1
1 Solution
 
asafadisCommented:
I'm not sure if the URL '\\wlls\208\bobby.xls' would work... but this is the idea:
<a href="\\wlls\208\bobby.xls"><button>Download Excel File!<button></a>

Open in new window

0
 
carlnorrbomCommented:
Hi,

A more smooth implementation might be:

<input id="btnOpenExcel" type="button" value="Open bobby.xls" onclick="Javascript:window.open('file://wlls/208/bobby.xls');"/>

Try it out and let me know.

/Carl.
0
 
Michel PlungjanIT ExpertCommented:
asafadis: Never wrap a button in a link
Instead use a form or the onClick
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
asafadisCommented:
@mplungjan:
the form... ok
"onclick" has the risk of not working if javascript is disabled in the client's computer.  It's an unnecessary risk.  Using a form, for example, is a perfectly javascript-independent solution that does the same thing.


why not wrap a button with a link?  just curious...
0
 
Michel PlungjanIT ExpertCommented:
because many browsers will not understand what you click, the link or the button
0
 
carlnorrbomCommented:
Hi,

Did you manage to get this running or?

/Carl.
0
 
ASOSWEAuthor Commented:
yes, thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now