Results 1 to 4 of 4

Thread: download button script

  1. #1
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking download button script

    Anybody got a 'download now' button script?
    Client wants people to download wmv file.
    I want to bypass 'right click' 'save file as'....

  2. #2
    Join Date
    Mar 2008
    Posts
    122
    Thanks
    17
    Thanked 5 Times in 5 Posts

    Default

    This is what i do:

    put this script right befor the </body> tag:

    <script language="javascript" type="text/javascript">
    <!--
    function download(url) {
    newwindow=window.open(url,'name','height=1,width=1');
    if (window.focus) {newwindow.focus()}
    return false;
    }

    // -->
    </script>

    then put this link into your document:

    <a href="#" onclick="return download('1.htm')">Click Here</a>




    after you have downloaded the files edit 1.htm:


    <script type="text/javascript">



    var browser_type=navigator.appName
    var browser_version=parseInt(navigator.appVersion)
    if (browser_type=="Netscape"&&browser_version>=5)
    window.location.replace("Your Filename Here")
    else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
    window.location.replace("Your Filename Here")
    else if (browser_type=="Netscape"&&browser_version>=4)
    window.location.replace("Your Filename Here")
    else
    window.location="Your Filename Here"
    </script>

    download the files below:
    (put all the files in the same directory)

  3. #3
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'll give it a try!

    Thanks

  4. #4
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok. It plays the video in mp when page is opened but no download window or option to download file appears.

    I'll keep playing with it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •