close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Simple Download

Thread began 5/09/2012 4:18 pm by richardjhollingsworth438953 | Last modified 5/30/2012 11:50 am by Jason Byrnes | 1717 views | 15 replies |

richardjhollingsworth438953

Simple Download

Want to start to only add downloading to a page on my site. I don't need to store away any # downloads or any other info. I just want to simply have the visitor to my site push the download button and a file downloads. Do I have to set up a full-blown dynamic site to do something this simple? Or is there a simple way I can have a download button allow a file download?

Sign in to reply to this post

Jason ByrnesWebAssist

well, it doesn't need to be a "Full Blown Dynamic Site", that would be a site that is driven by a database, but it does need to be a dynamic site.


the download behavior can only be added to a dynamic PHP page. so you will need to crate a php page
add a form with a submit button
then add the download behavior to tell it what file should be downloaded.

Sign in to reply to this post

richardjhollingsworth438953

Thanks. Let me try that.

Sign in to reply to this post

richardjhollingsworth438953

Trying to keep it simple. My existing site is static and was set up with 6 static pages (all done via Dreamweaver). It works fine. Now, to do downloading, I have to create a dynamic page to insert the download button and select the behavior. This, I assume, creates a PHP page that will now be a replacement for one of my existing static pages. Since I'm new to this, I'd like to keep the amount of change to a minimum. So, my question is what is the right/best way recommended to do this. Is it 1) re-create all 6 pages as dynamic, though 5 of the 6 are simple static (sounds dumb) or 2) create a dynamic site (using Dreamweaver) with test server (I have MAMP installed on my Mac) and create the PHP page, install a button (from Forms), insert the download action/behavior by Digital File Pro; I then test it using the test server and once I know it works, and replace the existing HTML page with this PHP page (on my remote server) while making sure the links to this page are changed accordingly? Or is there a 3rd better way to do this?

Sign in to reply to this post

Jason ByrnesWebAssist

  2) create a dynamic site (using Dreamweaver) with test server (I have MAMP installed on my Mac)  
  Or is there a 3rd better way to do this?  




the 3rd, better way to do this is to convert the existing site in dreamweaver to be a dynamic site that uses your local mamp server for testing.

only the page that will have the download button on it needs to be a php page, all of the other pages can remain as html pages. really all you need to is change the extension of the existing html page that will have the download button added to .php:

change:
pagename.htm

to:
pagename.php


and you're good to go.

Sign in to reply to this post

richardjhollingsworth438953

Thanks. Since your suggestion is logical and since putting in a button and setting the behavior is about as simple as it gets, if instead of using the local MAMP server (test server) I simply made the changes you suggested, uploaded the page to the inmotionhosting server and simply tried it out there it would be even easier (it's not like I'm creating a database, but simply a button and a file to download). Is this too risky? Or, should I set up the test server (to MAMP) anyway?

Sign in to reply to this post

Jason ByrnesWebAssist

that should work too.

Sign in to reply to this post

richardjhollingsworth438953

Simple Download - 2

I've followed the "Creating a Digital Download" instructions (pages 5 - 7) in "Getting Started with Digital File Pro 2" document from Web Assist website. I put the button on a dynamic PHP page. I run it through a "Test Site" from Dreamweaver and I get no error messages. I upload the PHP page to the remote server and run it and get no errors. When I push the "Download" button, nothing downloads.

When I look at the code that's created by Digital File Pro 2 in the actual final PHP page, the download button has 3 lines. The 1st line is: <form id="form1" name="form1" methods="post" action=""> The 2nd line is <input type="submit" name="download" id="download" value="Download"/> The 3rd line is </form>.

One obvious problem already is that the file that's to be downloaded (a PDF file) shows up nowhere in the code even though in the steps for creating the "Download behavior" (page 6 of Digital File Pro 2 instructions) I specified the folder field, the final name, and the "save as" field. For some reason, it does not show up in the code, so it seems the button worked but was not linked to the file I wanted to send. I checked and made sure that the file was in the root directory in both my local Mac and the remote server. Why isn't the actual file information getting into the PHP file?

One last piece of info is that I'm not linking this download button to any database table. I don't care about counting or restricting the number of downloads. I just want it to download. The instructions imply that if you don't want to link to send counts to a database table, then leave that lower section in the download steps unselected (it looks "grayed out"). I assume this is not my problem. Is the true or not?

Sign in to reply to this post

Jason ByrnesWebAssist

the code you reference is the form that you would have created, the download code is placed in the head of the php file.


to help troubleshoot. open the bindings panel (Window -> Bindings) and expand the WA Downloaded File binding group.

add the bindings from this section to your page for troubleshooting information. if you need further assistance, send a copy of the page, and the output of the bindings after trying a test.

Sign in to reply to this post

richardjhollingsworth438953

Simple Download - 2

I've attached a screen shot from Dreamweaver of the dynamic page. It includes the head of the PHP file. As far as I can tell, lines 1 - 8 capture the correct information. The file to be downloaded (a PDF file) is correctly shown. The 'root folder' name has spaces in it which I was led to believe would be OK, but this is the 'root folder' on my local Mac and it seems to work ok. The root folder on the remote server does not have any spaces in the name.

Also, on the attached file on the right side, the "Bindings" are shown and expanded for "WA Download File". You suggested "... add the bindings from this section to your page for troubleshooting information ...". I'm not sure where on my page to put them. Do I put them in the head of the dynamic page? If you could help me understand where to put these, it would be helpful.

Aside from that, is there anything in the attached file that you can see that might result the download not working?

Thanks.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...