![](http://content.invisioncic.com/r269793/set_resources_11/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Scottster
Members-
Posts
12 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Scottster's Achievements
Newbie (1/14)
2
Reputation
-
sophietheand reacted to a post in a topic: Hide 'Submit' button
-
The filed name is definitely: 'Stage7Completed'. I can give you the URL, but it is password protected. How would I get you the authentication?
-
I am still getting this error: TypeError: document.getElementById(...) is null
-
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.
-
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.
-
Kennethflit reacted to a post in a topic: Change Background For A Section Of A Datapage
-
I have a datapage which has some fields that are editable due to their inclusion in a script. I want to make it clear, though, that a user does not change any of the fields. I have created the following HTML: <div style="background-color: gray; padding: 10px 0px 10px 10px;"><b class="gray-bg">Automatically Calculated</b> <div style="padding: 3px 0px;"> <div style="width:30.5%; display:inline-block;"><label for="EditRecordSmart_PartsSubTbl_Stage3Completed" style="text-align: left; verticle-align: top;padding: 20px 7px 3px 0px;white-space: normal;color: #000000;font-size: 12px;font-family: Arial;">Completed</label></div> <input class="cbFormTextField" id="EditRecordSmart_PartsSubTbl_Stage3Completed" maxlength="15" name="EditRecordSmart_PartsSubTbl_Stage3Completed" size="25" style="color: #000000; font-size: 12px; font-family: Arial ; font-style: normal; font-weight: normal; border-color: #D2D6D9 #EEEEEE #EEEEEE #D2D6D9; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) inset; -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) inset; -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) inset; border-width: 1px; border-style: solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -o-border-radius: 3px; padding: 3px;" type="checkbox" value="" /></div> <div style="padding: 2px 0px;"> <div style="width:30.5%; display:inline-block;"><label for="EditRecordSmart_PartsSubTbl_Stage3DateCompleted" style="text-align: left; verticle-align: top;padding: 20px 7px 3px 0px;white-space: normal;color: #000000;font-size: 12px;font-family: Arial;">Date Completed</label></div> <input class="cbFormTextField" id="EditRecordSmart_PartsSubTbl_Stage3DateCompleted" maxlength="15" name="EditRecordSmart_PartsSubTbl_Stage3DateCompleted" size="25" style="color: #000000; font-size: 12px; font-family: Arial ; font-style: normal; font-weight: normal; border-color: #D2D6D9 #EEEEEE #EEEEEE #D2D6D9; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) inset; -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) inset; -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) inset; border-width: 1px; border-style: solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -o-border-radius: 3px; padding: 3px;" type="text" value="" /></div> </div> ------------------------------------------------- This displays correctly, and when the script runs, it fills out the fields correctly. When submitted (update single record datapage), the data in the fields are not saved. Can someone explain where I went wrong? Thanks
-
Add X Number Of Days To A Date Field
Scottster replied to Scottster's topic in User JavaScript and CSS Discussions
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; } } -
Add X Number Of Days To A Date Field
Scottster posted a topic in User JavaScript and CSS Discussions
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 -
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?
- 9 replies
-
- javascript
- css
-
(and 1 more)
Tagged with:
-
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?
-
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.
-
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.