정말이 도움말을 사용할 수 있습니다. 누군가 elses 코드를 수정하려고합니다. 기본적으로 스크립트가하는 일은 coldfusion을 통한 데이터 루프입니다. 사용자는 이러한 반복 된 각 항목에 데이터를 삽입한다고 가정합니다. 그런 다음 자바 스크립트 상자가 완료되면 사용자가 입력 한 데이터가 올바른지 확인합니다. 이것은 잘 작동합니다 ... 문제가있는 부분은 제출할 반복 된 양식을 선택하기 위해 클릭하는 각 반복 된 양식 옆에있는 확인란이 필요하다는 것입니다. 나는 coldfusion 부분을 쉽게 작동하도록했습니다. 그러나 확인 된 양식 만 확인하려면 확인 상자가 필요합니다.확인란을 선택하면 Coldfusion/Javascript가 표시됩니다.
확인 상자 Varibles Exaple
<cfset VARIABLES["PromptMessage" & CurrentRow] = VARIABLES["PromptMessage" & CurrentRow] & "<br /><br /><strong>LEASE:</strong> ">
<cfset VARIABLES["PromptMessage" & CurrentRow] = VARIABLES["PromptMessage" & CurrentRow] & "L. HRS: <strong style=""color:black"">' + $('##LE_LEFH#CurrentRow#').val() + '</strong>">
<cfset VARIABLES["PromptMessage" & CurrentRow] = VARIABLES["PromptMessage" & CurrentRow] & " | L. CYCLES: <strong style=""color:black"">' + $('##LE_LCYCLES#CurrentRow#').val() + '</strong>">
<cfset VARIABLES["PromptMessage" & CurrentRow] = VARIABLES["PromptMessage" & CurrentRow] & " | R. HRS: <strong style=""color:black"">' + $('##LE_REFH#CurrentRow#').val() + '</strong>">
<cfset VARIABLES["PromptMessage" & CurrentRow] = VARIABLES["PromptMessage" & CurrentRow] & " | L. CYCLES: <strong style=""color:black"">' + $('##LE_RCYCLES#CurrentRow#').val() + '</strong>">
<cfset VARIABLES["PromptMessage" & CurrentRow] = VARIABLES["PromptMessage" & CurrentRow] & "<br /><br />">
확인란 예
<div style="color:##ff0000;background-color:;background-color:##dadada;border-left:1px solid ##999;border-right:1px solid ##999;border-bottom:1px solid ##999;"><input type="Checkbox" name="Confirm#CurrentRow#" value="1"> <strong>Select to report engine usage for this aircraft.</strong></div></div>
Confirmation (확인) 상자 액션 코드입니다.
<script type="text/javascript">
$(document).ready(function(){
// catch submit
$("##btn_submit").click(function(e){
jConfirm('<strong>Confirm your engine usage information. Click Confirm to proceed or Edit to edit your values.</strong><cfloop from="1" to="10" index="x">#VARIABLES["PromptMessage" & x]#</cfloop><br />', 'Report Confirmation Dialog', function(r) {
// If they confirmed, manually trigger a form submission
if (r) $("##btn_submit").parents("FORM").submit();
});
// Always return false here since we don't know what jConfirm is going to do
return false;
});
});
$(document).ready(function() {
var $dialog = $('<div></div>')
.html('This dialog will show every time!')
.dialog({
autoOpen: false,
title: 'Basic Dialog',
modal: true,
height: 400,
buttons: {
"Delete all items": function() {
$(this).dialog("close");
},
Cancel: function() {
$(this).dialog("close");
}
}
});
$('##popup').click(function() {
$dialog.dialog('open');
// prevent the default action, e.g., following a link
return false;
});
});
</script>
쿼리가 반복적으로 반복됩니다.
무엇을 시도 했습니까? 나는 당신의 코드를 두번 쳐다 보면서 당신이 이것을 풀려고했을지도 모르는 곳을 보았다. 그러나 나는 그것을 찾을 수 없다. 내가 그것을 간과한다면 저를 용서하십시오. 예를 들어, 체크 박스에 jQuery가 참조 할 수있는 ID 또는 클래스를 지정하지 않았습니다. – mawburn
@DavidThomas는 ColdFusion에서 이스케이프 문자입니다. 변수는'#variablename # '과 같이'# '에 의해 참조됩니다. – mawburn
@CoderSeven : 수정 해 주셔서 감사합니다. =) –