LeonardYong Posted April 23, 2015 Report Share Posted April 23, 2015 Hi Guys, I have successfully employed the following script in a Submission Form to concatenate several virtual fields into one actual field upon mouse over. <script> document.getElementById('Submit').onmouseover = function(){ var date = document.getElementById('cbParamVirtual1').value; if(date == "") date = "1/1/2011"; var hour = document.getElementById('cbParamVirtual2').value; if(hour =="") hour="00"; var minute = document.getElementById('cbParamVirtual3').value; if(minute == "") minute = "00"; var second = document.getElementById('cbParamVirtual4').value; if(second == "") second = "00"; var ampm = document.getElementById('cbParamVirtual5').value; document.getElementById('InsertRecordActual_DateTime').value = date + " " + hour + ":" + minute + ":" + second + " " + ampm; }; </script> However, this does not work in an Update Form. I've tried changing the getElementById ('Submit').onmousover to getElementById ('Update').onmouseover thinking that this would work as the button on an update form is the UPDATE button instead of the SUBMIT button. This was to no avail. Any ideas?? Quote Link to comment Share on other sites More sharing options...
ChrisCarlson Posted April 23, 2015 Report Share Posted April 23, 2015 Did you try changing document.getElementById('InsertRecordActual_DateTime'). to document.getElementById('EditRecordActual_DateTime'). ? Quote Link to comment Share on other sites More sharing options...
LeonardYong Posted April 24, 2015 Author Report Share Posted April 24, 2015 Yes I tried EditRecord however it doesn't work. Because if you realize the function is triggered by mouse over of the SUBMIT button as seen from getElementById ('Submit') and there are no fields to edit as all Input fields are virtual in the first place. EditRecord can work using .onLoad = concatenate but all fields must be actual fields not virtual. Quote Link to comment Share on other sites More sharing options...
iren Posted April 24, 2015 Report Share Posted April 24, 2015 Hello cogclou3, I would recommend to change document.getElementById('Submit').onmouseover to document.getElementById('Mod0EditRecord').onmouseover and document.getElementById('InsertRecordActual_DateTime') to document.getElementById('EditRecordActual_DateTime'). Hope it helps. Quote Link to comment Share on other sites More sharing options...
LeonardYong Posted April 24, 2015 Author Report Share Posted April 24, 2015 You are a Caspio Ninja indeed! AWESOME it worked! Thank you so much ccarls and iren for contributing! Quote Link to comment Share on other sites More sharing options...
iren Posted April 24, 2015 Report Share Posted April 24, 2015 You are welcome! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.