Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9061303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:26:57+00:00 2026-06-16T15:26:57+00:00

I am new to jquery and am trying to make functions that will call

  • 0

I am new to jquery and am trying to make functions that will call and update my database with a dialog box. I modified an existing template to produce the code below and can’t get the function savefee to be called by the jquery function. There are no errors in my javascript console. Any help is appreciated.

`

<cfset getfees = new artservice().getfees()>

<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>

<script>
$(document).ready(function() {

    $(".artdiv").click(function() {
        var initialDiv = this;

        //based on which we click, get the current values
        var feeid = $(this).data("fee_id");
        var feetitle = $("h2", this).text();

        // set form values
        $("#fee_id").val(feeid);        
        $("#fee_title").val(feetitle);

        $("#editForm").dialog({
            buttons: {
                "Save": function() {
                    var thisDialog = $(this);
                        $.post("artservice.cfc", {
                        method: 'savefee',
                        fee_id: $("#fee_id").val(),
                        fee_title: $("#fee_title").val()
                        }, 
                    function() {
                        //update the initial div
                        $("h2", initialDiv).text($("#fee_title").val());
                        $(thisDialog).dialog("close");
                    });
                }
            }
        });
    });

});
</script>
<style>
.artdiv {
    padding: 5px;
    margin: 5px;
    background-color: #80ff80;
}
#editForm {
    display:none;   
}
</style>
</head>

<body>

<cfoutput query="getfees">

    <div class="artdiv" data-fee_id="#fee_id#">
        <h2>#fee_title#</h2>
    </div>

</cfoutput>

<div id="editForm" title="Edit Art">
    <input type="hidden" id="fee_id">
    <p>
    <b>Name:</b><br/>
    <input type="text" id="fee_title">
    </p>

</div>

</body>
</html>

`

The cfc is below

`

<cffunction name="getfees" access="public">
    <cfquery datasource="dsn" name="getfees" maxrows="10">select fee_id, fee_title from table</cfquery>
    <cfreturn getfees>
</cffunction>

<cffunction name="savefee" access="public">
<cfargument name="fee_id" required="yes">
<cfargument name="fee_title" required="yes">
<cfquery datasource="dsn">update table set fee_title = '#arguments.fee_title#' where fee_id = #fee_id#</cfquery>
</cffunction>

`

error was with this function in application.cfc
“The ARGS argument passed to the onCFCRequest function is not of type string”

public void function onCFCRequest(required string cfcname, required string method, required string args) {

    return;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:26:58+00:00Added an answer on June 16, 2026 at 3:26 pm

    The the error you are getting because of the incorrect function definition of ‘onCFCRequest’. The third argument of this function is a structure type but you have made the type as string. So the proper definition should be like.

    public void function onCFCRequest(required string cfcname, required string method, required struct args) {
    
        return;
    }
    

    Also, one more thing if you declare this function in the Application.cfc then you need to manually handled the function call inside the ‘onCFCRequest’. Something like you need to again recall the request function inside onCFCRequest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm rather new to jQuery and I'm trying to make a cool little menu
I fairly new to JQuery and perhaps trying to achieve something that might be
I am trying to create a jQuery function that will take a string and
Thanks for reading. I'm a bit new to jQuery, and am trying to make
I'm new to AngularJS. I'm trying to make my elements update when specific values
I'm new to jQuery and trying to combine the use of a tooltip plugin
I'm new to jQuery and trying to change an attribute of an SVG element
I've been trying to use the new jquery-ui, and all but the resizable function
I am new to Jquery and am trying to store the location and size
I am new to jQuery and am trying to fire a function on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.