traport
asked on
Passing the value of a select field from one cfwindow to another.
I can't figure out how to pass the value of the selectedUserID into the cfwindow 'w2'
<cfparam name="selectedUserID" default="">
<html>
<head>
<script language="javascript">
var mycallBack = function(){
document.getElementById("callback").innerHTML = "<br><br><b>This is printed by the callback handler.</b>";
}
<!--- The error handler pops an alert with the error code and message. --->
var myerrorhandler = function(errorCode,errorMessage){
alert("[In Error Handler]" + "\n\n" + "Error Code: " + errorCode + "\n\n" + "Error Message: " + errorMessage);
}
</script>
</head>
<cfoutput>
<body>
<cfwindow name="w1" title="CF Window 1" initShow=true
x=10 y=10 width="400" height="200">
User Administration.<br><br>
<cfform name="myForm">
<select name="SelectedUserID"
onChange="ColdFusion.navigate('test2.cfm?selectedUserID=(this.options[this.selectedIndex].value)','w2',
mycallBack,myerrorhandler);">
<option value="">Please Select</option>
<cfloop query="session.qry_getUsers">
<option value="#id#" <cfif selectedUserID eq id>selected</cfif>>#displayName#</option>
</cfloop>
</select>
</cfform>
</cfwindow>
<cfwindow name="w2" title="CF Window 2" initShow=true
x=450 y=10 width="600" height="600">
This is a second cfwindow control. This is where I try and dump the variables and I'm not getting selectedUserID
</cfwindow>
</body>
</cfoutput>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.