Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Simple jscript error!

Reply
Thread Tools

Simple jscript error!

 
 
=?Utf-8?B?TmFk?=
Guest
Posts: n/a
 
      05-23-2005
Hello,

I simply added an html button and textfield on an ASP.NET web page. Then on
the onclick event of the button I try to display a text on the textfield but
I get a script error. Here is the whole html contect of the web page:

<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script id="clientEventHandlersJS" language="javascript">
<!--
function htmlButtton_onclick() {
htmlText.value = "Hello";
}
//-->
</script>
</HEAD>

<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<INPUT id="htmlButtton" style="Z-INDEX: 101; LEFT: 440px; POSITION:
absolute; TOP: 120px" type="button" value="Button" language="javascript"
onclick="return htmlButtton_onclick()">
<INPUT id="htmlText" style="Z-INDEX: 102; LEFT: 240px; POSITION: absolute;
TOP: 120px" type="text">
</form>
</body>
</HTML>
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TmFk?=
Guest
Posts: n/a
 
      05-23-2005
By the way,
If I try to navigate from inside the event handler it works, but assigning
to the text field doesn't.

Thank you.

"Nad" wrote:

> Hello,
>
> I simply added an html button and textfield on an ASP.NET web page. Then on
> the onclick event of the button I try to display a text on the textfield but
> I get a script error. Here is the whole html contect of the web page:
>
> <HTML>
> <HEAD>
> <title>WebForm1</title>
> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
> <meta name="CODE_LANGUAGE" Content="C#">
> <meta name="vs_defaultClientScript" content="JavaScript">
> <meta name="vs_targetSchema"
> content="http://schemas.microsoft.com/intellisense/ie5">
> <script id="clientEventHandlersJS" language="javascript">
> <!--
> function htmlButtton_onclick() {
> htmlText.value = "Hello";
> }
> //-->
> </script>
> </HEAD>
>
> <body MS_POSITIONING="GridLayout">
> <form id="Form1" method="post" runat="server">
> <INPUT id="htmlButtton" style="Z-INDEX: 101; LEFT: 440px; POSITION:
> absolute; TOP: 120px" type="button" value="Button" language="javascript"
> onclick="return htmlButtton_onclick()">
> <INPUT id="htmlText" style="Z-INDEX: 102; LEFT: 240px; POSITION: absolute;
> TOP: 120px" type="text">
> </form>
> </body>
> </HTML>

 
Reply With Quote
 
 
 
 
Artur-ek
Guest
Posts: n/a
 
      05-23-2005

"Nad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I simply added an html button and textfield on an ASP.NET web page. Then
> on
> the onclick event of the button I try to display a text on the textfield
> but
> I get a script error. Here is the whole html contect of the web page:
>


> function htmlButtton_onclick() {
> htmlText.value = "Hello";


document.forms[0].htmlText.value = "Hello"; works


--
Artur Borecki
aboreckiATtenbit.pl


 
Reply With Quote
 
=?Utf-8?B?TmFk?=
Guest
Posts: n/a
 
      05-23-2005
Thank you, I think I need some studying before I go further. Do you know of
any online jscript tutorial or something?


"Artur-ek" wrote:

>
> "Nad" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hello,
> >
> > I simply added an html button and textfield on an ASP.NET web page. Then
> > on
> > the onclick event of the button I try to display a text on the textfield
> > but
> > I get a script error. Here is the whole html contect of the web page:
> >

>
> > function htmlButtton_onclick() {
> > htmlText.value = "Hello";

>
> document.forms[0].htmlText.value = "Hello"; works
>
>
> --
> Artur Borecki
> aboreckiATtenbit.pl
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is Server-Side Jscript (not Jscript.NET)? Maxwell2006 ASP .Net 5 03-07-2006 05:28 AM
JScript.Net (JScript 7.0) is official documented language VK Javascript 4 01-12-2006 06:48 PM
Porting from JScript to JScript.Net - compiler error Jon Maz ASP .Net 4 09-09-2004 10:24 AM
Which to Learn: Javascript, Jscript, JScript.NET, ECMA 262 (3rd ed)? John Bentley Javascript 14 02-05-2004 06:14 PM
Simple JScript Jenny ASP .Net 1 08-11-2003 06:51 AM



Advertisments