50 개 질문을 포함하는 온라인 언어 테스트를 제공하고 있습니다. 각 질문에는 자체 최대 지속 시간 (초 단위)이 있습니다. 각 질문의 초 수는 dbase의 변수입니다. 변수 "초"가 질문 1에 대해 60이고 5 개의 확인란을 포함하고 있다고 가정하면 그 중 3 개를 확인해야합니다. 이것은 참가자가 3 초의 올바른 체크 박스를 체크하는 데 60 초가 걸린다는 것을 의미합니다. 참가자가 올바른 시간대에 "시간"을 확인하면 제출을 클릭합니다. 사용자가 60 초 이내에 응답하지 않으면 페이지가 자동으로 제출됩니다 (모든 확인란을 선택하지 않은 경우에도 해당). 테스트 창의 왼쪽 위 모서리에서 후보자는 수평 타임 바가 움직이는 것을 볼 수 있습니다. 초가 표시되지 않지만 그의 시간이 곧 만료 될 때 후보자가 아주 명확하게 볼 수 있습니다 ...jquery 가로 바 시간이 가변적 인 페이지를 제출하려면
이 절차는 자바 스크립트 (아래 참조)를 사용하여 아무런 문제없이 4 년간 일해 왔습니다. 그러나 모든 브라우저에서 작동하지는 않습니다. 파이어 폭스는 그것을 인식하지 못한다. 결과적으로 파이어 폭스 사용자는 전 세계에서 답변을 완료하거나 연구 할 수있다 :-) 지금까지 "죄송합니다. 우리 시스템은 인터넷에 최적화되어 있습니다. 익스플로러 만 ", 그게 그랬어. 결국, 모든 브라우저의 95 %가 어쨌든 IE였습니다. 하지만 지금은 사용자 통계를 검토 한 결과 모든 참여자의 67 %만이 IE를 사용합니다. 그래서 내가 현재 JQuery에 '페이지의 자바 스크립트에서 내 스크립트를 수정하는 방법을 찾고 있는데. 나는 몇 주 전에 JQUERY를 발견했습니다 (저는 프로그래머가 아닙니다). 저는 JQUERY를 여러 가지 용도로 사용했으며, 매력처럼 작동합니다. 그리고 더 중요한 것은 JQUERY가 모든 브라우저에서 작동하는 것 같습니다!
그러나 트릭을 수행 할 수있는 올바른 JQUERY 코드를 찾지 못하는 것 같습니다. 당신의 내용 , 나는 현재 아래 사용하고 코드 부착 해요 :
<!--
#bar, #barbackground
{
position:absolute;
left:0;
top:0;
background-color:#FFFFFF;
}
#barbackground{
background-color:#c0c0c0;
}
-->
</style>
<CFOUTPUT>
<CFIF #selectvragen.Vragen_seconds# EQ 0><CFSET seconden=60><CFELSE><CFSET seconden=#selectvragen.Vragen_seconds#+2></CFIF>
<script language="JavaScript1.2">
//1) Set the duration for the progress bar to complete loading (in seconds)
var duration=#seconden#
function postaction(){
document.forms.formulier.submit()
//Example action could be to navigate to a URL, like following:
//window.location="submit.cfm?scoreperpage=#scoreperpage#&subcatID=#selectvragen.Vragen_subcatID#&level=#selectvragen.Vragen_level#&maxpunten=#maxpunten#&maxtebehalenpunten=#selectvragen.Vragen_maxpunten#&vnr=#vnr#&Tabel=too_late&optie=1&score=#score#&teller=#teller#&nieuwelijst=#nieuwelijst#&starttijdQuestion=#CreateODBCDateTime(now())#"
}
///Done Editing/////////////
var clipright=0
var widthIE=0
var widthNS=0
function initializebar(){
if (document.all){
baranchor.style.visibility="visible"
widthIE=bar.style.pixelWidth
startIE=setInterval("increaseIE()",50)
}
if (document.layers){
widthNS=document.baranchorNS.document.barbackgroundNS.clip.width
document.baranchorNS.document.barNS.clip.right=0
document.baranchorNS.visibility="show"
startNS=setInterval("increaseNS()",50)
}
}
function increaseIE(){
bar.style.clip="rect(0 "+clipright+" auto 0)"
window.status="Loading..."
if (clipright<widthIE)
clipright=clipright+(widthIE/(duration*20))
else{
window.status=''
clearInterval(startIE)
postaction()
}
}
function increaseNS(){
if (clipright<202){
window.status="Loading..."
document.baranchorNS.document.barNS.clip.right=clipright
clipright=clipright+(widthNS/(duration*20))
}
else{
window.status=''
clearInterval(startNS)
postaction()
}
}
window.onload=initializebar
</script>
</CFOUTPUT>
<script language="JavaScript1.2">
if (document.all){
document.write('<div id="baranchor" style="position:relative;width:200px;height:10px;visibility:hidden;">')
document.write('<div id="barbackground" style="width:200px;height:10px;z-index:9"></div>')
document.write('<div id="bar" style="width:200px;height:10px;z-index:10"></div>')
document.write('</div>')
}
</script>
내가 진행하는 방법을 모르는를도이 질문이 명확인지 확실 ... 나는 또한 수입니다 필요한 경우 더 나은 화면을 제공하기 위해 테스트 스크린 샷을 보내시겠습니까? 사전에
감사합니다,
종류의 안부
토마스 (벨기에)
답변을 주셔서 감사합니다. 정직하게도 Jquery 플러그인이 필요한지 여부를 알지 못했기 때문에 살펴 보겠습니다. – Thomas
당신의 기쁨! –