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

  • Home
  • SEARCH
  • 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 9173209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:32:10+00:00 2026-06-17T16:32:10+00:00

The Objective: Execute a javascript function on $.ajax named on server side and get

  • 0

The Objective:

Execute a javascript function on $.ajax named on server side and get it on result.

The Problem:

On data.ExecuteClientCode I’ll get the name of the function that I should execute in that case : "AfterFamilySelectedUpdateParameters()" but my problem is that i don’t know how to set that string in order to be executed.

The code:

view:

function AfterFamilySelected()
           {
                $.ajax({
                        url: "/@Model.ControllerAfterEntitySelected/@Model.ActionAfterEntitySelected" ,
                        type: "POST",
                        async: false,
                        success: function(data, status, xhr) {
                                     **data.ExecuteClientCode;**
                                  },
                        error: function(xhr, status, err) {
                            alert('error');
                        }
                    });
           }

controller:

   [HttpPost]
        public ActionResult AfterFamilySelected() 
        {
            return Json(new { ExecuteClientCode = "AfterFamilySelectedUpdateParameters()" });
        }
  • 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-17T16:32:11+00:00Added an answer on June 17, 2026 at 4:32 pm

    Assuming the method is attached to the window you could do:

    Server

     HttpPost]
     public ActionResult AfterFamilySelected() 
     {
        return Json(new { ExecuteClientCode = "AfterFamilySelectedUpdateParameters" });
     }
    

    Client

     var callback = window[data.ExecuteClientCode];
     if (callback)
         callback();
    

    You would need to remove the brackets from the value you return from the server.

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

Sidebar

Related Questions

I try to decrypt data that was originally encrypted with Objective-C in Java. There
Assume that a cocoa app must execute some vitally important objective-c operation before it
I am writing an application in Objective-C whose functionality is to call and execute
Objective: I want to create a web service that allows me to connect to
Objective: In support of a Windows Service that may have multiple instances on a
Objective Initialize a new addition problem for users to solve when they visit /task
The objective is to write a convenience method that return a ResultSet from a
im looking to execute to execute command line commands from objective c. I know
In Objective-C, what is the best way to wait to execute something at a
I'm trying to call ffmpeg from NSTask in objective-c. I execute the ffmpeg command

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.