Add dinamic value to javascript.
I know that the solution is probably simple, however I can not hanle it since javascript is not really my thing. Now, I just want to add a dynamic value to javascript, for example ID and pass it (on button click) with the same script to previously built Coldfusion page.
here is an example
<cfquery name="test11" datasource="datasource">
SELECT *
FROM database
</cfquery>
<cfset javaDinamicID= #test11.ID# >
and javascript, something like this
<script language="javascript" type="text/javascript">
function testDinamicID() {
req=new XMLHttpRequest(); req.open('GET','/JavaID.cfm?ID=' this part here I cannot handle, how to add a dynamic value here +1+'&'+'NAME='+aaa,false); req.send(null);
}
</script>
Am I on the right track?
