Jump to content


  • Content Count

  • Joined

  • Last visited

About Scottster

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. The filed name is definitely: 'Stage7Completed'. I can give you the URL, but it is password protected. How would I get you the authentication?
  2. I am still getting this error: TypeError: document.getElementById(...) is null
  3. I have the following code: function CalcArrivalDate(){ var v_LeadTime = document.getElementById("InsertRecordLeadTime").value; var v_ShipMethod = document.getElementById("InsertRecordShipMethod").value; var v_NewDate = new Date(); if(typeof Date.today() != 'undefined'){ v_LeadTime = (v_LeadTime ? Number(v_LeadTime) : 0); if(v_ShipMethod){ switch(v_ShipMethod) { case 'Ocean': document.getElementById('InsertRecordStage7Completed').checked = false; v_NewDate = Date.today().addDays(v_LeadTime + 37); break; case 'Air Priority': document.getElementById('InsertRecordStage7Completed').checked = false; v_NewDate = Date.today().addDays(v_LeadTime + 3); var x = true; break; case 'Air Economy': document.getElementById('InsertRecordStage7Completed').checked = True; v_NewDate = Date.today().addDays(v_LeadTime + 6); var x = true; break; default: break; } document.getElementById("InsertRecordEstimatedArrivalDate").value = v_NewDate.toString('MM/dd/yyyy'); } }else{ console.log('Date Library is not loaded'); } } When the selection is made, the date changes correctly. The 'InsertRecordStage7Completed', however, does not. The debugging does not show any errors, so I am not sure where I went wrong. I have tried 'document.getElementById('InsertRecordStage7Completed').value = True;', but still no luck.
  4. I have a dropdown field that I want to be able to enter a custom value. I do not want this value to be added to the table. In Microsoft Access, there is an option to 'LimitToList = false'. So instead, I created a Virtual field with the dropdown options. I also have the actual field called 'ItemName'. If someone uses the dropdown, the option will be copied to the 'ItemName' field. If they want to enter a custom value, they can simply fill in the 'ItemName' field. Here is my script: <script> function EnterCustomValue() { var v_standardOption = document.getElementsByName("cbParamVirtual1")[0]; document.getElementById("insertRecorditemName").value = v_standardOption; } document.getElementById("cbParamVirtual1").addEventListener("change", EnterCustomValue); </script> If the dropdown is used, it gives me an error saying the filed is empty.
  5. function CalcArrivalDate() { var v_LeadTime = document.getElementById("InsertRecordLeadTime").value; var v_ShipMethod = document.getElementById("InsertRecordShipMethod").value; if (v_ShipMethod == "Ocean") { var v_NewDate = new Date(); v_NewDate.setDate(v_NewDate.getDate() + v_LeadTime); document.getElementById("InsertRecordEstimatedArrivalDate").value = v_NewDate; } }
  6. I am trying to add a variable number of days to a date field. Here is my script: var v_NewDate = new Date(); v_NewDate.setDate(v_NewDate.getDate() + v_LeadTime); If I use todays date (April 9, 2015), and v_LeadTime = 10, I receive the value "Tue Sep 26 2017 13:36:25 GMT-0500 (Central Daylight Time)". Can someone explain what I am doing wrong? Thanks
  7. I am trying to implement this on a Report Results Page, without luck. I assume the script goes in the footer, but is there some other change that is necessary?
  8. I need to create a link to an external url that is password protected. I need to accomplish the following: 'http://User:Password@www.testsite.ca/TestInvoice.pdf' I need it to work on all browsers, though (the above link does not work in Internet Explorer). Is there a way to pass the username and password to an external url with javascript?
  9. Thanks for the quick reply! I entered the code, but it did not hide the 'Submit' button: var cb_statusCheck = '[@field:status]'; if (cb_statusCheck == 'Booked') { document.write(' '); document.write('This time slot has already been booked!'); document.write(' '); document.write('Select A Different Time Slot'); } else { setTimeout('document.getElementById("caspioform").submit()',0); } I tried entering it directly above "document.write(' ');". This code exists in the footer.
  10. I have a datapage that is set to auto-submit if certain conditions are met. If the conditions are not met, though, the page does not auto-submit and it gives an error message. I have all the code working, except I need the 'Submit' button hidden so that the user cannot select it.
  • Create New...