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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:39:20+00:00 2026-05-25T23:39:20+00:00

I need to call a Javascript function from the server side in Client side.

  • 0

I need to call a Javascript function from the server side in Client side. I looked and didn’t find any way how to do it. I looked also over AJAX but can’t figure it out. I am using ASP ( clasic) not .net .

I need to call the function in client-side with a variable that comes from the client-side. Please help me!!! Thanks a million !!!

I am using a FlashMovies that is sending a value to a Javascript function through ExternalInterface class. The function in javascript receiving it is gAnswer(result) and in this function i would need to have something like :

Server side:
function saveResult(result)
{code to be saved on the server goes here }

Client side :
function gAnswer (result)
{ saveResult(result) } <- THis is the part i dont know how to do.
The function gAnswer is being called when the flash movie finished by itself.
Would you be able to provide some code on how to ? thanks to each one of you who helped me =)

  • 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-25T23:39:21+00:00Added an answer on May 25, 2026 at 11:39 pm

    Call serverside function from client side via Ajax using this here:

    function CallServersideFunction() {
    
    
            url = "CmsAjax.asp";
            if (window.XMLHttpRequest) {
                http = new XMLHttpRequest()
            }
            // code for IE
            else if (window.ActiveXObject) {
                http = new ActiveXObject("Microsoft.XMLHTTP")
            }
    
            if (http) {
                http.open("GET", url, true)
                http.onreadystatechange = handleHttpResponsearticleID;
            }
            isWorking = true;
            http.send(null);
    
    
    }
    
    function handleHttpResponsearticleID() {
        if (http.readyState == 4) {
            if (http.responseText.indexOf('invalid') == -1) {
                var xmlDocument = http.responseXML;
                fno = xmlDocument.getElementsByTagName('id').length;
                if (fno > 0) {
                alert('Successfully done.')
                    }
            }
        }
    }
    

    On this page “CmsAjax.asp” you can do your serverside operations.

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

Sidebar

Related Questions

I need to call server side function from client side using JavaScript. How can
I need to call a javascript function from my controller in codeigniter.It is possible
If I want to call a server function from JavaScript to retrieve a name
I am using jQuery and JavaScript, I need to call the jQuery function inside
I need to call a const function from a non-const object. See example struct
Can I call javascript function from MVC controller action (not from view page) and
I have a view that contains a javascript function that i need to init/call
I am trying to call a javascript function from asp.net codebehind using onclientclick for
I have a JavaScript function that I need to call inside my body tags.
I need to create links on webpage which call a javascript function with different

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.