CF/Ajax - How to pass parameters to a cfwindow?
Hi,
Is there a way to pass parameters to a cfwindow?
If yes, please provide me with all relevant details.
HERE IS MY SITUATION:
I have a form, in which I'm looping over a recordset e.g.
<cfform name="frmTest">
<cfset counter = 0>
<cfloop query="variables.qTest">
<cfset counter = variables.counter + 1>
<cfinput
type="checkbox"
name="test_#variables.counter#_ch"
onClick="showPopUp(#variables.qTest.id#,#variables.qTest.amount#)">
</cfloop>
</cfform>
Here is my javascript / ajax:
<script type="text/javascript">
<!--
function showPopUp(id,amt){
ColdFusion.Window.show("approvalWindow");
}
//-->
</script>
And here is my cfwindow:
<cfwindow
name="approvalWindow" center="true" closable="true"
draggable="false" modal="true" title="Approval"
initshow="false" width="680" height="315">
HOW CAN I OBTAIN THE VALUES OF id AND amt HERE?
E.g.
<cfset idClicked = id>
<cfset amtClicked = amt>
I'll be needing those 2 variables for further processing...
</cfwindow>
I know I could have used a simple javascript window.open and passed those 2 parameters in the URL scope, but, I don't want my users to see what id I'm sending.
Thanks and regards,
Yogesh Mahadnac.