lundi 12 janvier 2015

Download a pdf only if a checkbox is checked

i created a php page Download a PDF file only if a checkbox is checked. i open the pdf file when checkbox is click by the user but i need give direct download the PDF file when user click. pls help it





<script>
function toggleCheckbox(element)
{

window.open('pdf/Code_of_Med_Ethics-a.pdf') ;
}
</script>



<input type="checkbox" onchange="toggleCheckbox(this.id)" name="click" value="agree" id="click"} ?> >





Aucun commentaire:

Enregistrer un commentaire