all groups > dotnet jscript > october 2006 >
You're in the

dotnet jscript

group:

Write to TextBox



Write to TextBox John
10/19/2006 11:09:01 AM
dotnet jscript: Hi,

I am new to JScript .NET.

Can anybody recommend a good book on Jscript .NET?

The question I have right now is how to update a textbox in my web page.

The function is as the following:

<script language="javascript" type="text/javascript">
// <!CDATA[
function myButton_onclick()
{
//myText is Input(Text) and myButton is Input(Button)
myText.value = “Thank you very much!”;
}
// ]]>
</script>

Thanks.
Re: Write to TextBox Martin Honnen
10/21/2006 3:28:39 PM
[quoted text, click to view]

JScript.NET does not have much support in terms of books, articles, and
tools (IDE support) compared to other main .NET languages like C# or VB.NET.

[quoted text, click to view]

That above is client-side JavaScript and not JScript.NET. If you want to
use JScript.NET on the server in ASP.NET then a simple example looks like

<%@ Page Language="JScript"%>
<script runat="server">
function Button1_Click (sender: Object, e: EventArgs) : void {
Text1.Text = "Kibology for all";
}
</script>
<html lang="en">
<head>
<title>JScript.NET example</title>
</head>
<body>
<form runat="server">
<asp:button id="Button1" runat="server" text="test button"
onclick="Button1_Click"></asp:button>
<asp:textbox id="Text1" runat="server"/>
</form>
</body>
</html>

See the ASP.NET 1.x quick start samples online where you can select to
see examples in JScript.NET:
<http://samples.gotdotnet.com/quickstart/aspplus/>



--

Martin Honnen --- MVP XML
AddThis Social Bookmark Button