jasonc Posted November 4, 2010 Share Posted November 4, 2010 I have the following code, but wish to allow admin members to download the short WMV video without having the page reload. My page can have anything to to 20 videos on the page. I can place a button there but how to I get the video files to download and not play when clicked. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Admin</title> <link href="style2010.css" rel="stylesheet" type="text/css"> </head> <body style="width:1000px; width: 50%; margin-left: auto; margin-right: auto;"> <div style="width:1000px; padding-right: 3px; padding-left: 3px; height:100%; min-height: 500px;"> <div align="center"><h2>Admin</h2><br /></div> <div style="float: left; padding-left: 5px;"> <form name="delete" method="post" action=""> <div align="center" style="float: left; padding: 0 10px 50px 10px;"> <object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="MediaPlayer1" standby="Loading Windows Media Player components..." width="300" height="300"> <PARAM NAME="url" value="67.wmv" /> <param name="src" value="67.wmv" /> <param name="showcontrols" value="true" /> <param name="autostart" value="false" /> <!--[if !IE]>--> <object type="video/x-ms-wmv" data="67.wmv" width="300" height="300"> <param name="src" value="67.wmv" /> <param name="autostart" value="false" /> <param name="controller" value="true" /> </object> <!--<![endif]--> </object> <br />67.wmv<br />Delete above file? <input name="67---wmv" type="checkbox" value="delete"> </div> <br clear="all"/><input type="submit" name="Delete Selected" value="Delete Selected"> </form> <br /><br /> </div> </div> <br style="clear:both" /> </body> </html> Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 4, 2010 Share Posted November 4, 2010 You would want to do this: http://phpsnips.com/snippet.php?id=55 Mainly look at the part in the if section. Quote Link to comment Share on other sites More sharing options...
jasonc Posted November 4, 2010 Author Share Posted November 4, 2010 but that will redirect them to a new page when downloading. Can this not be done without having to reload or go to another page ? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 4, 2010 Share Posted November 4, 2010 No, all sites do that. If the file starts downloading, you 99% of the time won't leave the page anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.