Search the Community
Showing results for tags 'multiplescripts'.
-
Hi! I have multiple scripts for a submission page. When I execute the page I am only able to get one to work at a time. Not all three. I am not sure what I am doing wrong. Any help or advice would be appreciated. I have pasted the scripts below. I have all the scripts in the footer of the page. The first simply checks that the MOQ field is greater than the Inner Pack field. The second checks that cost is less than retail. They third, if the virtual check box is checked, it will copy the data from the Vendor VPN field to the Vendor Style field. <SCRIPT LANGUAGE="JavaScript"> function check() { var v_moq = parseFloat(document.getElementById("InsertRecordMOQ").value); var v_innerpack = parseFloat(document.getElementById("InsertRecordINNERPACK").value); if(v_moq<v_innerpack) { window.alert("MOQ Must Be Less Than The Inner Pack"); return false; } } document.getElementById("caspioform").onsubmit=check; </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> function check() { var v_cost = parseFloat(document.getElementById("InsertRecordCOST").value); var v_retail = parseFloat(document.getElementById("InsertRecordRETAIL").value); if(v_cost>v_retail) { window.alert("Vendor Cost must be less than Retail"); return false; } } document.getElementById("caspioform").onsubmit=check; </SCRIPT> <script> function f_vendorstyle() { if(document.getElementById('cbParamVirtual1').checked) { document.getElementById('InsertRecordVENDORSTYLE').value=document.getElementById('InsertRecordVENDORVPN').value; } else { document.getElementById('InsertRecordVENDORSTYLE').value=""; } } document.getElementById('cbParamVirtual1').onclick= f_vendorstyle; </script>
- 2 replies
-
- javascript
- multiplescripts
-
(and 1 more)
Tagged with: