I've installed mxAjax on my CF 7.1 server running IIS. My server is
running in reverse proxy with and Apache 2.0 server which handles
multiple sites. My site's proxy path is www.root/pti and I installed
mxAjax under the pti folder: root/pti/mxAjax and created a Virtual
Directory on IIS (mxAjax) pointing to that folder.
The default example page is displayed but none of the samples will
work.
I have created my own page using the UpdateField function and my own
cfc. This works but doesn't return data to the fields:
========================
Here's my code:
<cfoutput>
<script type='text/javascript' src='../mxAjax/core/js/
prototype.js'></script>
<script type='text/javascript' src='../mxAjax/core/js/mxAjax.js'></
script>
<script type='text/javascript' src='../mxAjax/core/js/
mxUpdateField.js'></script>
</cfoutput>
<cfset rooturl = "
https://parview.partech.com/pti/ptifinance">
<script language="javascript">
var url = "<cfoutput>#ajaxUrl#</cfoutput>";
function init() {
new mxAjax.UpdateField({
parser: new mxAjax.CFArrayToJSArray(),
paramArgs: new mxAjax.Param(url,{param:"myBillto={mysites}",
cffunction:"qlookupAging"}),
target: "BILL_TO_NAME,STORE_NUMBER",
source: "mysites"
});
}
addOnLoadEvent(function() {init();});
</script>
</head>
<body>
<!--- get sites requesting financing --->
<cfquery datasource="Finance" name="getStores">
SELECT DISTINCT Bill_To_number, Bill_To_name FROM ValidCust
</cfquery>
<div id="container">
<div id="top">
<h2><cfoutput>#session.proc#</cfoutput> - Welcome to PAR Finance
Portal</h2>
</div>
<div id="content">
<form action="act_fin.cfm" method="post" enctype="application/x-www-
form-urlencoded">
<select name="mysites" id="mysites">
<cfoutput query="getStores">
<option value="#bill_to_number#">#bill_to_number# - #bill_to_name#</
option>
</cfoutput>
</select>
<!--- show action buttons based on user privilege array --->
Bill to : <input id="BILL_TO_NAME" name="BILL_TO_NAME" type="text"
size="30" />
Store : <input id="STORE_NUMBER" name="STORE_NUMBER" type="text"
size="30" />
</form>
</div>
</div>
=========================
Here is the fire bug dump:
Params:
ajaxcallid 733_1202841787721
function qlookupAging
method init
myBillto 09769
Response:
{"RECORDCOUNT":1,"COLUMNLIST":"BILL_TO_NAME,STORE_NUMBER","DATA":
{"BILL_TO_NAME":[09769],"STORE_NUMBER"
:["MD011081"]}}
===================================
Data does not show up in the fields!
What am I doing wrong? Any help would be appreciated.
Thanks, Jim