-
need a little help with this
Script: "Accept terms" form submission
http://www.dynamicdrive.com/dynamici...acceptterm.htm
i need to know if and how this script could be edited to download a file on clicking the button instead of submitting the form, thanks for help in advance.
-
-
Well, there's two ways. You can either modify your form cgi/php script to invoke a download, or I suspect you're looking for an easier way, which is simply to use JavaScript instead. Try modifying the code:
if (window.checkobj&&checkobj.checked)
return true
inside Code of Step 1 to:
if (window.checkobj&&checkobj.checked){
window.location="http://www.mysite.com/what.zip"
return false
}
where "http://www.mysite.com/what.zip" is the path to your file to download. This only works if the file type (ie: zip) triggers a file download in the browser instead of simply loading it, such as a .gif.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks