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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:32:15+00:00 2026-06-04T19:32:15+00:00

I have a javascript class called MyTest.js, now I register this script on the

  • 0

I have a javascript class called MyTest.js, now I register this script on the load of my MyWebPage.cs, But i need to pass 3 parameters to the function which it will then make a call to a web service. Here is my javascript function

MyTest.init = function() {
    var params = new Hash();
    params.set("blank", "blank");
    new Ajax.Request('/Test.asmx/CreateClients', {
        method: 'post',
        onSuccess: attachCallback(this, "Yay"),
        onFailure: attachCallback(this, "Nay"),
        onException: attachCallback(this, "Nay"),
        parameters: params
    });
}

Now the parameters i need to pass are two stings, name and notes which I can get in the load of my .cs file. How can I pass the values to this init function?

Thank you

  • 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-04T19:32:16+00:00Added an answer on June 4, 2026 at 7:32 pm

    Use the data property:

    MyTest.init = function() {
        var params = new Hash();
        params.set("blank", "blank");
        new Ajax.Request('/Test.asmx/CreateClients', {
            method: 'post',
            data: {Name:"name", Notes:"Notes"},
            onSuccess: attachCallback(this, "Yay"),
            onFailure: attachCallback(this, "Nay"),
            onException: attachCallback(this, "Nay"),
            parameters: params
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following javascript class which I am trying to pass to an
I have javascript code embedded inside a html template file. When I load this
I have a JavaScript class defined as shown here: function Item() { this.init(); }
I have a script called notify_me.php which I run like so: script type=text/javascript> //Run
I have a class called listaDoble , in a Javascript document. And I have
Say I have a javascript function/class called Foo and it has a property called
I have JavaScript class: <html> <head> <script src=MicrosoftAjax.js type=text/javascript></script> <script src=jquery-1.6.4.min.js type=text/javascript></script> </head> <body>
I have some javascript that goes out and fetches a javascript class on another
I have in my javascript these 2 functions classes: // product class function Product()
I'm trying a more object oriented approach with javascript and have implemented a class

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.