Skip to main content
Known Participant
May 28, 2008
Question

Using jQuery to Submit a Form to a Method in a CFC

  • May 28, 2008
  • 2 replies
  • 467 views
Is this possible? If so, how to you pass in the arguments? Something like this does not work:

This topic has been closed for replies.

2 replies

jqcfAuthor
Known Participant
May 30, 2008
JonWorks, how do you access the username and direction in that cfc? Do those parameters come in the url scope? I'd rather not have to have the cfc looks for the variables in the url. scope. Is there anyway for these variables to be passed into the method in the arguments. scope automatically?
Inspiring
May 28, 2008
I don't know the answer to this specific question, but in many query languages, arguments are sent to functions like this:

x = somefunction(arg1,arg2, etc)
or
x = somefunction (arg1=val1 arg2=val2 etc)

Participant
May 29, 2008
Below is the exact code I am using in production. The RemoteAccountService.cfc is a remote proxy generated by ColdSpring. The updateAccessLevel method will either promote or demote the username depending on the direction parameter. The remote proxy has some code to return the result of the method, or the exception that is thrown, in JSON so we parse that out and pull out the error message and detail. getALInfo() updates the page with the new data.