mark048 Posted March 14, 2017 Report Share Posted March 14, 2017 Hi, I've played with this for a couple hours now and can't seem to get it to work. I am receiving a parameter PROJECTID and trying to combine it with a field from a cascading auto complete text field USERID. Both fields are numerical fields. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x1 = document.getElementByName("InsertRecorduserid")[0].value; var x2 = document.getElementById("InsertRecordprojectid").value; var projectiduserid = x1 + x2; document.getElementById("InsertRecordprojectiduserid").value = projectiduserid; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> Any ideas what I'm missing? Thanks, Mark Quote Link to comment Share on other sites More sharing options...
mark048 Posted March 15, 2017 Author Report Share Posted March 15, 2017 I figured it out! Should have been getElements vs getElement for cascading field. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x1 = document.getElementById("InsertRecordprojectid").value; var x2 = document.getElementsByName("InsertRecorduserid")[0].value; document.getElementById("InsertRecordprojectiduserid").value = x1+x2; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> 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.