bmarineau Posted June 24, 2014 Report Share Posted June 24, 2014 Hi, I have an update form that contains 2 hidden fields. Depending on the changes made in the form, the value of the hidden fields needs to change. One of the fields is a dropdown what controls placement on a report. I have added the following javascript to the footer. Any changes I make to the data are saved in the table, however, the hidden fields never change. Hopefully someone can spot the error in my code. Thanks, Bill <SCRIPT LANGUAGE="JavaScript"> function concatenate1() { var Sched.Status = document.getElementById("EditRecordStatus").value; var Control = document.getElementById("EditRecordID").value; var Company = document.getElementById("EditRecordCompany").value; var Company25 = Company.substring(0,25); var Position = document.getElementById("EditRecordPosition").value; var Date = document.getElementById("EditRecordDate_Open").value; var CompanyPosition = Control + ' - ' + Company + ' (' + Position + ')'; document.getElementById("EditRecordCompany_Position").value = CompanyPosition; if (Sched.Status == "Future Credit") { var DateControl = 'FC' + Date + ' - ' + Control + ' - ' + Company25; } else { var DateControl = Date + ' - ' + Control + ' - ' + Company25; } document.getElementById("EditRecordDate_Control").value = DateControl; } document.getElementById("caspioform").onsubmit=concatenate1; </SCRIPT> Quote Link to comment Share on other sites More sharing options...
Jan Posted June 25, 2014 Report Share Posted June 25, 2014 Hello Bill, May the problem be in the dot in the name of the variable? The Sched.Status is present in the code. I hope, if you change it to, for example, SchedStatus the code will work. Quote Link to comment Share on other sites More sharing options...
bmarineau Posted June 25, 2014 Author Report Share Posted June 25, 2014 Hi Jan, Thanks so much. I've been looking / tweeking this on and off for a few days. Can't believe I missed something so simple. Another set of knowledgeable eyes are a wonderful thing. Bill 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.