I have the following in a ColdFusion page that pulls in some data for us once the page has loaded:
ajaxRequest#RowURnumber[I]#.open("POST", "/cfapps/include/scriptname.cfm?i=#RowNumber[I]#", true);
ajaxRequest#RowURnumber[I]#.send(null);
Would it be possible to host this script on a different server in our network and call it with the above code? I have tried using a http address and a UNC path but they don’t seem to work.
Any ideas would be greatly appreciated.
Thanks.
You cannot simply use ajax to access any page other than the same domain even its the same network.
For your solution, you would use a proxy page in your domain,
From the front end you would perform an AJAX request to this proxy page in your domain,
which will fetch the contents from that coldfusion page and pass it through to frontend.
In server A you will have a proxy page say proxy.cfm
So your AJAX will ask Server A to get the contents from server B and return it.