View Single Post
  #8 (permalink)  
Old August 23rd, 2006, 11:14 AM
DaveyDoCode DaveyDoCode is offline
Registered User
 
Join Date: Aug 2006
Location: omaha, ne, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've got a problem with this first sample as well. The client button doesn't work. This little tidbit:

document.getElementById("lblClient").innerText = "Changed"

didn't display the "innertext" option as I was typing it in.

Here is all the code:


<%@ 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 runat="Server">
<title>My First .Net Page</title>
<meta content="text/VBScript" http-equiv="content-script-type" />
<script language="VBscript" type="text/VBscript">

// <!CDATA[

function btnClient_onclick() {
document.getElementById("lblClient").innerText = "Changed"
document.getElementById("lblServer").innerText = "Server"
}

// ]]>
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button ID="btnServer" runat="server" Text="Server" style="z-index: 100; left: 16px; position: absolute; top: 168px" Height="24px" Width="64px" />
        <asp:Label ID="lblServer" runat="server" Text="Server" style="z-index: 101; left: 104px; position: absolute; top: 168px" Width="88px"></asp:Label>
        <input id="btnClient" style="z-index: 103; left: 16px; position: absolute; top: 200px; width: 64px;"
            type="button" value="Client" onclick= "return btnClient_onclick()" />
        <asp:Label ID="lblClient" runat="server" Text="Client" style="z-index: 104; left: 104px; position: absolute; top: 200px" Width="88px"></asp:Label>

        </div>
    </form>
</body>
</html>

Thanks in advance for any help.