<input type="button" class="downloadedFile" value="Download File" onclick="window.location.href=\'documents/' . $docsRow['docFileName'] . '\'" />
$ docsRow [ 'docFileName']는 각 문서의 경로입니다 MySQL 데이터베이스에서 검색됩니다.
더 큰 그림은 이러한 문서가 각 아코디언 창에는 하나 개 이상의 문서와 클래스 인 상태, JQuery와 아코디언에 있다는 것입니다 - 같은 같은 :
<div id="accordion">
<h3><a href="#">LEAD5220 - Leader as Change Agent</a></h3>
<div>
<p class="className">Leader as Change Agent</p>
<p class="classNumber">LEAD5220</p>
<hr class="classSeparator" />
<table width="95%">
<tr>
<td><strong>Document Name:</strong> Generic Annotation Format</td>
<td width="100px" align="right"><input type="button" class="downloadedFile" value="Download File" onclick="window.location.href='documents/Generic Annotation Format.docx'" /></td>
</tr>
<tr>
<td colspan="2"><strong>Description:</strong> This document can be used as a template for your annotations in the annotated bibliography forums.</td>
</tr>
</table>
<hr class="classSeparator" />
...
내 클라이언트가 수를 계산 할 수 싶어 각 문서는 클래스 당 번 다운로드되었습니다.
나는 자바 스크립트를 통해 버튼 클릭을 감지 할 수 있고 "클래스 별"부분까지 jQuery를 사용하여 버튼이 클릭 된 클래스 테이블을 감지 할 수 있지만 이해할 수없는 부분은 1) 데이터베이스에 기록 할 PHP/MySQL 코드로 정보를 가져 오는 방법, 2) 버튼 클릭 만 감지 할 수 있는지 또는 사용자가 실제로 파일을 컴퓨터에 다운로드했는지 여부를 감지 할 수 있는지 여부 (PDF, DOC, XLS 파일).
누구에게 도움을 주셔서 감사합니다.
Duh! 아약스! 내가 이미 사이트의 나머지 부분에 그것을 많이 사용하고있는 것처럼! (나는 단지 6 개월의 일시 중지 후이 사이트로 나 자신을 reacquainting하고있다) 고마워, Moshe (그리고 DaDaDom, 물론)! – marky
기꺼이 도와 드리겠습니다. –