?
Solved

HTML Button

Posted on 2008-06-26
7
Medium Priority
?
171 Views
Last Modified: 2010-04-21
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
Comment
Question by:ASOSWE
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 11

Expert Comment

by:asafadis
ID: 21872616
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
 
LVL 18

Accepted Solution

by:
carlnorrbom earned 2000 total points
ID: 21872871
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
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 21872885
asafadis: Never wrap a button in a link
Instead use a form or the onClick
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:asafadis
ID: 21874411
@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
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 21875403
because many browsers will not understand what you click, the link or the button
0
 
LVL 18

Expert Comment

by:carlnorrbom
ID: 21923757
Hi,

Did you manage to get this running or?

/Carl.
0
 

Author Closing Comment

by:ASOSWE
ID: 31470885
yes, thank you
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question