Question
converting javascript variable to coldfusion
I am running a form that submits data via the cf ajax to a
.cfc file --
when it returns to the calling page -- i turn the forms into text and remove the form fields.
the problem is i run the statement:
document.getElementById("PROGRAM_TYP").innerHTML = document.myform.PROGRAM_TYP.value;
most of the items submitted are just text values and the value of the form field is the actual display text which then populates correctly.
in this case -- the form field is a select where and ID is used -- so when i go to populate the <td> with the submitted value -- it only puts in the ID (as this was the actual submitted value)
i am trying to take this submitted value and resolve the ID back to the display value and use this value in place of the document.myform.PROGRAM_TYP.value
what i need to be able to do is convert the document.myform.PROGRAM_TYP.value into something i can plug into CFQUERY.
or use the <cfreturn> to return and catch a specific variable.
when it returns to the calling page -- i turn the forms into text and remove the form fields.
the problem is i run the statement:
document.getElementById("PROGRAM_TYP").innerHTML = document.myform.PROGRAM_TYP.value;
most of the items submitted are just text values and the value of the form field is the actual display text which then populates correctly.
in this case -- the form field is a select where and ID is used -- so when i go to populate the <td> with the submitted value -- it only puts in the ID (as this was the actual submitted value)
i am trying to take this submitted value and resolve the ID back to the display value and use this value in place of the document.myform.PROGRAM_TYP.value
what i need to be able to do is convert the document.myform.PROGRAM_TYP.value into something i can plug into CFQUERY.
or use the <cfreturn> to return and catch a specific variable.
