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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:02:05+00:00 2026-05-23T18:02:05+00:00

In my application,we use the prototype1.4.2 in the page. And we need the tree

  • 0

In my application,we use the prototype1.4.2 in the page.

And we need the tree view which support lazy load(make a ajax request and add the data from the server to the node),then I found the

TafelTree

It is built based on the prototype.

And there is a function:

onopenpopulate:

It will load data from the server according the “openlink” provided by user.

Called after a branch is opened. When it’s open, it launch an Ajax
request at the page openlink and send the Ajax response to the user
function. It must return a JSON string representing an array of one or
more TafelTreeBranch. Override setOnOpenPopulate() of TafelTree

But it need the server return pure json data format.

And I have created a webservice this way:

[WebService(Namespace = "http://microsoft.com/webservices/";
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class UtilService: WebService {
    [WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public string loadData(id) {
      //some logic according the id
      return "{id:0,name:'xx'}";
    }
}

However when I invoke this service use:

http://xxx/UtilService/loadData?id=0

I always get the xml format.

Through google,it seems that I have to set the “content-type” when make the ajax request.

However,in my case,the ajax is sent by the “TafelTree”,I can not add extra parameters.

Any idea? or use another prototype based tree?

  • 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-05-23T18:02:06+00:00Added an answer on May 23, 2026 at 6:02 pm

    you can use jquery to do an Ajax call.

    $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "webServiceUrl/MethodName",
            data: "{Id: '" + id + "'}",
            dataType: "json",
            success: loadSucceeded,
            error: loadFailed,
            async: true
        });
    
    function loadSucceeded(result, status)
    {
        var data = result.d;
    }
    
    function loadFailed(result, status)
    {
    }
    

    Note that it is not necessarily to return a string, you can return a list of object.

    [WebService(Namespace = "http://microsoft.com/webservices/";
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ScriptService]
    public class UtilService: WebService 
    {
        [WebMethod]
        public List<string> loadData(id) {
          //some logic according the id
          return new List<string>(){"data"};
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

TL;DR Summary: I need a single command-line application which I can use to get
In our Spring application we use clustered Hibernate Search with ActiveMQ which sets up
I'm creating a Grails application which makes use of the RichUI plug in and
I have third party dlls that I need to use with my application. The
My application is working 24X7 and I use DataTable for data handling. I need
Can the application use set same char in the XON and XOFF? If yes,
I am wanting to expose some data service endpoints for internal application use and
Somebody said that when your PHP code and application use global variables then it
I'm using Visual Studio to create my installation package. My application use some bitmap
My application makes use of a SQLite database to store the user's inputs. The

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.