# Calcul................. Aidez-moi!

• Joelo
• Born
• Inscription: Aoû 30, 2003
• Messages: 1
• Status: Offline

Août 30th, 2003, 7:04 am

S'il vous plaît aider quelqu'un sur la façon de faire écho Ext_Record_count (nombre d'enregistrements Number) dans la fonction ci-dessous à partir du formulaire

Code: [ Select ]
function calculation() {
for (num=0; num< <%=Ext_Record_Count%>; num++) {
if( !x_LowOperatingRange.value || x_LowOperatingRange.value=="NA" || (document.getElementById('PRE_DEVICEID_'+num).value.match("PSH")) && x_HighOperatingRange.value <= 30) {

document.getElementById('PRE_SetPointPressure_'+num).value + 5;
}
else if(document.getElementById('PRE_DEVICEID_'+num).value.match("PSH")) && Math.floor(x_HighOperatingRange.value) * 115/100) > x_MAWP.value * 0.95) {
document.getElementById('PRE_SetPointPressure_'+num).value = x_MAWP.value * 0.95;
}
else if(document.getElementById('PRE_DEVICEID_'+num).value.match("PSH")) {
document.getElementById(PRE_SetPointPressure_.value = Math.floor(x_HighOperatingRange.value)) * 115/100);
}
if( !x_LowOperatingRange.value || x_LowOperatingRange.value=="NA" || (document.getElementById('PRE_DEVICEID_'+num).value.match("PAH")) && Math.floor(x_HighOperatingRange.value)*107.5/100) > (0.95 * x_MAWP.value)) {

document.getElementById('PRE_SetPointPressure_'+num).value = x_MAWP.value * 0.95;
}
else if(document.getElementById('PRE_DEVICEID_'+num).value.match("PAH")) {
document.getElementById('PRE_SetPointPressure_'+num).value = Math.floor(x_HighOperatingRange.value)*107.5/100);
}
if( !x_HighOperatingRange.value || x_HighOperatingRange.value=="NA" || (document.getElementById('PRE_DEVICEID_'+num).value.match("PSL")) && x_LowOperatingRange.value <= 30) {

document.getElementById('PRE_SetPointPressure_'+num).value = x_LowOperatingRange.value - 5;
}
else if(document.getElementById('PRE_DEVICEID_'+num).value.match("PSL")) && x_LowOperatingRange.value >= 31) {
document.getElementById('PRE_SetPointPressure_'+num).value = Math.ceil(x_LowOperatingRange.value)*85/100);
}
if( !x_HighOperatingRange.value || x_HighOperatingRange.value=="NA" || (document.getElementById('PRE_DEVICEID_'+num).value.match("PAL"))) {
document.getElementById('PRE_SetPointPressure_'+num).value = Math.ceil(x_LowOperatingRange.value)*92.5/100);
}
}

}
1. function calculation() {
2. for (num=0; num< <%=Ext_Record_Count%>; num++) {
3. if( !x_LowOperatingRange.value || x_LowOperatingRange.value=="NA" || (document.getElementById('PRE_DEVICEID_'+num).value.match("PSH")) && x_HighOperatingRange.value <= 30) {
4. document.getElementById('PRE_SetPointPressure_'+num).value + 5;
5. }
6. else if(document.getElementById('PRE_DEVICEID_'+num).value.match("PSH")) && Math.floor(x_HighOperatingRange.value) * 115/100) > x_MAWP.value * 0.95) {
7. document.getElementById('PRE_SetPointPressure_'+num).value = x_MAWP.value * 0.95;
8. }
9. else if(document.getElementById('PRE_DEVICEID_'+num).value.match("PSH")) {
10. document.getElementById(PRE_SetPointPressure_.value = Math.floor(x_HighOperatingRange.value)) * 115/100);
11. }
12. if( !x_LowOperatingRange.value || x_LowOperatingRange.value=="NA" || (document.getElementById('PRE_DEVICEID_'+num).value.match("PAH")) && Math.floor(x_HighOperatingRange.value)*107.5/100) > (0.95 * x_MAWP.value)) {
13. document.getElementById('PRE_SetPointPressure_'+num).value = x_MAWP.value * 0.95;
14. }
15. else if(document.getElementById('PRE_DEVICEID_'+num).value.match("PAH")) {
16. document.getElementById('PRE_SetPointPressure_'+num).value = Math.floor(x_HighOperatingRange.value)*107.5/100);
17. }
18. if( !x_HighOperatingRange.value || x_HighOperatingRange.value=="NA" || (document.getElementById('PRE_DEVICEID_'+num).value.match("PSL")) && x_LowOperatingRange.value <= 30) {
19. document.getElementById('PRE_SetPointPressure_'+num).value = x_LowOperatingRange.value - 5;
20. }
21. else if(document.getElementById('PRE_DEVICEID_'+num).value.match("PSL")) && x_LowOperatingRange.value >= 31) {
22. document.getElementById('PRE_SetPointPressure_'+num).value = Math.ceil(x_LowOperatingRange.value)*85/100);
23. }
24. if( !x_HighOperatingRange.value || x_HighOperatingRange.value=="NA" || (document.getElementById('PRE_DEVICEID_'+num).value.match("PAL"))) {
25. document.getElementById('PRE_SetPointPressure_'+num).value = Math.ceil(x_LowOperatingRange.value)*92.5/100);
26. }
27. }
28. }

C'est la forme
*************

Code: [ Select ]
<tr id="trow_<%=Ext_Record_Count%>" name="ntrow_<%=Ext_Record_Count%>">
<td class="data" height="58" bgcolor="#F5F5F5"> <input type="text" id="PRE_idDEVICEID_<%=Ext_Record_Count%>" name="PRE_DEVICEID_<%=Ext_Record_Count%>" value="<%=trim(Rs_Ext("DEVICEID")) %>" size=15 maxlength=10>
</td>
<td class="data" bgcolor="#F5F5F5"> <input type="text" id="PRE_idSETPOINTPRESSURE_<%=Ext_Record_Count%>" name="PRE_SETPOINTPRESSURE_<%=Ext_Record_Count%>" value="<%=trim(Rs_Ext("SETPOINTPRESSURE")) %>"size=6 maxlength=8>
</td>
<td class="data" bgcolor="#F5F5F5"> <input type="text" id="PRE_idFOUNDPRESSURE_<%=Ext_Record_Count%>" name="PRE_FOUNDPRESSURE_<%=Ext_Record_Count%>" value="<%=trim(Rs_Ext("FOUNDPRESSURE")) %>" size=6 maxlength=8>
</td>
<td class="data" bgcolor="#F5F5F5"> <input type="text" id="PRE_idLEFTPRESSURE_" name="PRE_LEFTPRESSURE_<%=Ext_Record_Count%>" value="<%=trim(Rs_Ext("LEFTPRESSURE")) %>" size=6 maxlength=8 onBlur="CyJS_Utils_isNumber(this);">
</td>
1. <tr id="trow_<%=Ext_Record_Count%>" name="ntrow_<%=Ext_Record_Count%>">
2. <td class="data" height="58" bgcolor="#F5F5F5"> <input type="text" id="PRE_idDEVICEID_<%=Ext_Record_Count%>" name="PRE_DEVICEID_<%=Ext_Record_Count%>" value="<%=trim(Rs_Ext("DEVICEID")) %>" size=15 maxlength=10>
3. </td>
4. <td class="data" bgcolor="#F5F5F5"> <input type="text" id="PRE_idSETPOINTPRESSURE_<%=Ext_Record_Count%>" name="PRE_SETPOINTPRESSURE_<%=Ext_Record_Count%>" value="<%=trim(Rs_Ext("SETPOINTPRESSURE")) %>"size=6 maxlength=8>
5. </td>
6. <td class="data" bgcolor="#F5F5F5"> <input type="text" id="PRE_idFOUNDPRESSURE_<%=Ext_Record_Count%>" name="PRE_FOUNDPRESSURE_<%=Ext_Record_Count%>" value="<%=trim(Rs_Ext("FOUNDPRESSURE")) %>" size=6 maxlength=8>
7. </td>
8. <td class="data" bgcolor="#F5F5F5"> <input type="text" id="PRE_idLEFTPRESSURE_" name="PRE_LEFTPRESSURE_<%=Ext_Record_Count%>" value="<%=trim(Rs_Ext("LEFTPRESSURE")) %>" size=6 maxlength=8 onBlur="CyJS_Utils_isNumber(this);">
9. </td>
• Anonymous
• Bot
• Inscription: 25 Feb 2008
• Messages: ?
• Loc: Ozzuland
• Status: Online

Août 30th, 2003, 7:04 am

• Bigwebmaster
• Inscription: Déc 20, 2002
• Messages: 8922
• Loc: Seattle, WA & Phoenix, AZ
• Status: Offline

Août 30th, 2003, 8:12 am

Assurez-vous d'utiliser le code BBCode tags lorsque vous envoyez des messages code. Je les mets à votre place autour de votre code de manière à ce que ses plus facile à voir. Si vous avez besoin d'aide pour utiliser ce cliquez sur ce lien:

http://www.ozzu.com/faq.php?mode=bbcode
Ozzu Hosting - Want your website on a fast server like Ozzu?

## Afficher de l'information

• Total des messages de ce sujet: 2 messages
• Utilisateurs parcourant ce forum: roelof et 140 invités
• Vous ne pouvez pas poster de nouveaux sujets
• Vous ne pouvez pas répondre aux sujets
• Vous ne pouvez pas éditer vos messages
• Vous ne pouvez pas supprimer vos messages
• Vous ne pouvez pas joindre des fichiers

© 2011 Unmelted, LLC. Ozzu® est une marque déposée de Unmelted, LLC