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 8827783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:27:17+00:00 2026-06-14T07:27:17+00:00

[I realise this might seem like a stupid question but I am lost.] Using

  • 0

[I realise this might seem like a stupid question but I am lost.]

Using umbraco 4.9 I have a multi-lingual site where I have made an event handler to replicate content nodes to all languages as they are created in the back office to all languages. I am now trying to attach this to a custom context menu item(umbraco.interfaces.IAction) to give the creator a choice.

In the context menu item it is only possible to call a javascript function as a string. I shouldn’t touch the umbraco code itself so how can I pass a value to a web service? Where do I include the reference?

This is what I have at the moment:

public string JsSource
{
     get 
     { 
         return "function AddItem(){" +
                 "var multiLang = confirm('Create for all languages?');" +
                  //"$.ajax({" +
                  //"type: 'Post'," +
                  //"url: 'TryAgain.aspx/' + SendMultiVal" +
                  //"data: multiLang})" +
                  //"PageMethods.SendMulti(multiLang);}" +
                  string.Format("{0}.actionNew()", ClientTools.Scripts.GetAppActions)+"};"; 
     }
}

Thanks in advance.

  • 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-14T07:27:18+00:00Added an answer on June 14, 2026 at 7:27 am

    So the first thing that you need to do is to store the boolean value in a variable called boolvalue and then call the callservice function once you have the value.For eg:

      CallService("POST", "YourServiceUrl",boolvalue,
            function (data) {
                alert("Service Call Success");
            },
            function (result) {
                alert('Service call failed: ' + result.status + '' + result.statusText);
            });   
    

    This will make a service call and get data from service if it returns some data.

       CallService = function (method, serviceUrl, value, successHandler, errorHandler) {
        $.ajax({
            type: method,
            url: serviceUrl,
            contentType: "application/text; charset=utf-8",
            dataType: "json",
            data:JSON.stringify(value),
            success: successHandler,
            error: errorHandler
        });
    };
    

    Modify the dataType and dataType fields depending upon the type of data that you send and receive from the service.
    Look into this if you need more information:
    http://api.jquery.com/jQuery.ajax/

    Let me know if this works out for you.

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

Sidebar

Related Questions

I realise that this might be a stupid question, but I have not come
this might sound like a daft question but I can't seem to find a
This might seem like a strange question, and perhaps I am not thinking about
This might at first glance seem rather similar to this question , but in
This might seem like a ridiculous question since I'm quite inexperienced in .NET. Is
I realise this might be hard to explain, so let me start by using
This question may seem blindingly obvious and I realise I am putting myself up
This is a bit of a vague question I realise, but I've been looking
I realize this might be a long shot, but does anyone have an example
OK, I realize that question might seem weird, but I just noticed something that

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.