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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:17:22+00:00 2026-05-13T18:17:22+00:00

Ive set up a basic client side callback to a WCF service. see sample

  • 0

Ive set up a basic client side callback to a WCF service. see sample code below.

when viewing using an http filter attached to the explorer you can see that:
1. service1.svc/js is working fine and return proper java script to the browser
2. serrvice1.svc works and returns a proper json data.
3. call is fine and using alert instead of updating the div info i get the data.

but then after OK on the alert the page is then reloaded from scratch.

cant understand why? got any idea?

code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Simple_ClientNetwork_Calls.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>

</head>
<body >
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Path="~/WebKit.js" />
            </Scripts>
             <Services>
                <asp:ServiceReference  Path="~/Service1.svc" />
            </Services>
        </asp:ScriptManager>
      <script type="text/javascript">
          var BedList = null;
          var status = null;

          //add a window.load handler to init any necessary controls
          Sys.Application.add_load(initializeControls);

          function initializeControls(e) {
              status = $get("status");
          }

          function testme() {
              document.bgColor = "#FF0000";
              getBedList();
          }

          function getBedList() {
              iMDsoft.Demo.SimpleService.GetBedList(GetBedListOnSuccess, GetBedListOnFailed);
          }


          function GetBedListOnSuccess(results, context, methodName) {

              var BedList = results
              status.innerText = "Complete" + BedList[0].Name;
          }

          function GetBedListOnFailed(results, context, methodName) {
              status.innerText = "GetBedListOnFailed: " + results.get_message();
          }

    </script>
    <button id="button1" onclick="testme();" >TestMe</button>
    <div id="status">
            </div>
     </div>
    </form>
</body>
</html>
  • 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-13T18:17:23+00:00Added an answer on May 13, 2026 at 6:17 pm

    Not sure if this applies to buttons as well, but at least for links, you need to return false in the onclick event. Try this:

    <button id="button1" onclick="testme();return false;" >TestMe</button>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 513k
  • Answers 513k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer import module1 import unittest class MyTest(unittest.TestCase): def setUp(self): # Replace… May 16, 2026 at 5:54 pm
  • Editorial Team
    Editorial Team added an answer Look in the "Net" tab. May 16, 2026 at 5:54 pm
  • Editorial Team
    Editorial Team added an answer public virtual ActionResult Edit(int id, FormCollection collection, Spotlight s) so… May 16, 2026 at 5:54 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've got a basic HTTP client set up in C++, which works ok so
I've got a RESTful WCF service using Basic authentication, a custom service host, and
I've written a simple Application that utilizes WCF to communicate between client and server.
I've a basic php script set up on a web server to accept xml
i've been making web app's and working with various server side language like php,
I am using the comet long-polling technique with apache, php, jquery. I've got a
I've just built a basic ASP MVC web site for deployment on our intranet.
I'm using C# .net library System.Speech to implement my ASR app ( BTW, I've
I've Got a Window with this basic layout: <Window MinHeight=72 MaxHeight=400 Height=Auto MinWidth=460 MaxWidth=460>
I'm a bit new to rails so if this is very basic please bear

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.