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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:34:47+00:00 2026-05-16T02:34:47+00:00

I am sending an object that i generated within a class from the server

  • 0

I am sending an object that i generated within a class from the server as a result of web service call.

alt text

it is returning with __type and it’s other attributes from server.

alt text

I want to add some function to this object to call from everywhere easly in my files.

How can i achieve this?

Thanks…

  • 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-16T02:34:48+00:00Added an answer on May 16, 2026 at 2:34 am

    Well if I get you right, you want to add a function() to the returned object. You can’t add a function serverside, since you are not allowed to transfer executable javascript code within a JSON object.

    So you would have to add a method/property to that object after your client has created your javascript object. like

    success: function(data){
       data.my_new_method = function(){
          // yay!
       }
    },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble sending an UIImage object to my REST web service that only
From my client, I am sending an object that is related to other objects:
I am making an application in Android, which requires sending bitmap object from one
I am sending password text to the http service request object.like <request><password>pass.text</password></request> now this
I am trying to receive a json object back from php after sending data
I'm sending from server to clients base64 strings with decoded coordinates of some objects.
Sending XML from C# Server and receiving it it in Android Java client This
I'm used to sending files via SOAP to / from C# based web services
I have problem with sending a object from my webservice. I have created a
I am attempting to consume a WCF web service from a Java client using

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.