Call a ColdFusion function on another server?
By : Slartibartfast
Date : March 29 2020, 07:55 AM
I wish did fix the issue. If you've got access to a server that can run Java, can you not run the whole thing on there anyway? Otherwise, as you've figured, you can just create a component with a remote function and have that do the work, along the lines of: code :
<cfcomponent output="false">
<cffunction name="runMyJava" returntype="String" output="false" access="remote">
<cfargument name="MyArg" type="String" />
<cfset var MyObj = createObject('java','whatever') />
<cfreturn MyObj.doJavaMagic( Arguments.MyArg ) />
</cffunction>
</cfcomponent>
<cfset MyWebService = createObject('webservice','https://myotherserver/mycomponent.cfc?wsdl')/>
<cfset MyString = MyWebService.runMyJava( MyString ) />
|
Not getting a return from remote coldfusion method with jQuery ajax call
By : Raymond Chau
Date : March 29 2020, 07:55 AM
This might help you Which version of ColdFusion are you running? If not the latest (version 9) then you may need to add the following if-statement to the onRequestStart() method in your Application.cfc to address a bug whereby the presence of the onRequest() function messes with remote calls: code :
<cffunction name="onRequestStart" returnType="boolean" output="false">
<cfargument name="thePage" type="string" required="true">
<!--- Other code in your onRequestStart method --->
<!--- Add the following to the end of your onRequestStart method --->
<cfif ListLast( arguments.thePage,"." ) IS "cfc">
<cfset StructDelete( this, "onRequest" )>
<cfset StructDelete( variables,"onRequest" )>
</cfif>
<cfreturn true>
</cffunction>
|
Call Javascript function from ColdFusion CFC
By : Pincushion
Date : March 29 2020, 07:55 AM
With these it helps Was over complicating things trying to use javascript for the ajax call. Just switched over to using cfhttp and all is working as needed. DeserializeJSON method of CF works great to parse the json object returned from the Google API.
|
Call specific function from remote PHP in jQuery Validate's remote method
By : Spithost
Date : March 29 2020, 07:55 AM
Hope this helps I'm using jQuery Validate plugin for field validations on my registration page. , You can pass another parameter so core.php knows what you want to do code :
"remote": {
url: "../assets/php/core.php",
type: "post",
data: {
action: 'check_account',
username: function() {
return $('#register-form :input[name="username"]').val();
}
}
}
if ($_POST['action']=='check_account')
{
...do something...
}
|
Call JavaScript function from remote server
By : Michelle Villeza
Date : March 29 2020, 07:55 AM
This might help you Yes, must add a cross-origin rule to the header of your javascript file, which allows access from your other server. Otherwise, your Browser doesn´t let you do that.
|