Link to home
Start Free TrialLog in
Avatar of Marketing_Insists
Marketing_Insists

asked on

plain old button link

How do I create a button link?
The link points to a executible that I want the user to download

like this?
<FORM METHOD="LINK" action="software/vpn.exe"><a href="software/vpnclient.exe">
                    <p> <input value="get" class="button_match1"
                    style="float: right;" type="submit"></a>
                    </p>
                  </form>
Avatar of _Maddog_
_Maddog_
Flag of United States of America image

Well, if you don't want to use javascript, it can be as simple as that:

<FORM action="software/oakwoodvpn.exe">
<p> <input value="get" class="button_match1" style="float: right;" type="submit">
</p>
</form>

There's no such method "LINK", if you want to specify a method, use GET instead, or specify nothing.
Also, there's no need for the <a> tag. the action parameter can handle that.
Avatar of Marketing_Insists
Marketing_Insists

ASKER

Thanks

but some how instead of getting the link of the executible (vpn.exe), I just get the name (vpn)  I can still download the file, it's just without it's extension (unless I append it after downloading)

It works locally if you open it in your browser
  file:///c:/Apache2/htdocs/index.html

but not via http (clips off the .exe)
   http://myworkstation/index.html
so maybe ...

<form method="post" action="">
<input type="button" value="get" " 'some javascript thing here?' "software/vpn.exe">
</form>
So, the button is obviously not meant to do anything but cgi stuff.  so what bit of code would allow a button to open a webpage?
ASKER CERTIFIED SOLUTION
Avatar of _Maddog_
_Maddog_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jessegivy
Follow mad dog's good advice.

As for the download, you're gonna have to specify the correct content type, here ya go:

http://ppewww.ph.gla.ac.uk/~flavell/www/content-type.html
oh geez, why just post lengthy links, it's a good read though if you're up for it.  you just gotta set the enctype attrube of the form tag:

<FORM action="software/oakwoodvpn.exe" enctype="application/octet-stream">
<p> <input value="get" class="button_match1" style="float: right;" type="submit">
</p>
</form>

Cheers,

Jesse
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial


Going by mad dogs example, I eventually mucked around and settled on:
<form name="form1" method="post" action="">
      <input type="button" class="button_match1" style="float: right;" value="Get" onClick="location.href='software/vpnclient.exe'">
</form>

The CSS  based button worked great
What plans do you have in order to support those without scripting?