Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Text in flashes and disappears

$
0
0

I have a web site project I copied from the web, in an attempt to learn about java scripting (and ASP.NET programming in general).  When I test the page, it "sort of" works; that is, it updates the text in the <span> control to the value set by a function.  However, the text appears and disappears in a flash, so that, in an actual web page, it would be quite useless, unhelpful, annoying, etc.  Any help will be appreciated.  The page code is below:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><!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 id="Head1" runat="server"><style type="text/css">
            body { font: 11pt Trebuchet MS;
                   color: #000000;
                   padding-top: 72px;
                   text-align: center; }
            .text { font: 8pt Trebuchet MD }</style><title>Simple Web Service</title><script type="text/javascript">

    function OnGreetingsClick()
    {
        Samples.Aspnet.HelloWorld.Greetings(
        $get("NameTextBox").value,
        OnGreetingsComplete);
    }

    function OnGreetingsComplete(result)
    {
        var elem = $get("Results");
        elem.innerHTML = result;
    }</script></head><body><form id="form1" runat="server"><div><asp:ScriptManager runat="server"><Services><asp:ServiceReference Path="http://localhost/WT_HelloWorldWebService/HelloWorld.asmx" /></Services></asp:ScriptManager><h2>Simple Web Service Client</h2><p>Calling a simple service that shows a greeting
     and the server date and time</p><table><tr><td>Name:</td><td><input type="text"
                id="NameTextBox" /></td></tr><tr><td>&nbsp;</td><td><button id="GreetingsButton"
                onclick="OnGreetingsClick()">Greetings</button></td></tr></table></div><hr /><div><span id="Results"></span></div></form></body></html>


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>