Solved

HTML Button

Posted on 2008-06-26
7
167 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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
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!

 
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

Independent Software Vendors: 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

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

732 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