Ask a Question related to ASP.NET General, Design and Development.
-
Javier Ros #1
JavaScript events
hi guys,
I want to write events in JavaScript for my asp controls (TextBox for
example).
This is the HTML code of my WebForm, it have only a TextBox:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false"
Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="...">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 164px; POSITION:
absolute; TOP: 80px" runat="server"></asp:TextBox>
</form>
</body>
</HTML>
And this is the HTML code generate by the server:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="...">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="WebForm1.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwyMTA1NTI4MTE3Ozs+u44Ib3Yg/KNtF+PuxRv2LA/u8HE=" />
<input name="TextBox1" type="text" id="TextBox1" style="Z-INDEX: 101;
LEFT: 164px; POSITION: absolute; TOP: 80px" />
</form>
</body>
</HTML>
Well, how to add 'OnExit = "callMyJavaScriptFunction();"' to "input" tag in
the generate Code by the server from C# codebehind?
I have thought in "PreRender" Event of TextBox Control but ... I donīt know
how to.
thanks in advance.
..Javier Ros Moreno.
P.D.: Sorry, my Inglish is poor, I want generate this:
I want this: <input name="TextBox1" type="text" id="TextBox1"
style="Z-INDEX: 101; LEFT: 164px; POSITION: absolute; TOP: 80px" OnExit =
"callMyJavaScriptFunction();" />
Javier Ros Guest
-
javascript events - onchange toggle forms
Hi, below is where im at now. Ive got my JS toggling on and off a form from any selection below. Allt he options below turn on the same form. My... -
Flickering of ActiveX caused by html or javascript events
Hi all, I have encountered an issue where activex controls flicker when certain events occur. For example: A simple HTML button causes the... -
Include javascript in a javascript file
Hello, Is there a way to include a javascript file from WITHIN a javascript file? Something similar as in the "#include" directive in C++? ... -
How to code JavaScript events from HyperLinkColumn
Hi, I have defined a simple grid with a hyperlink column as follows: <asp:HyperLinkColumn HeaderText="Description"... -
need javascript staff (anyone who knows javascript peroid) (READ)
hey its me ultimategamerx and im back in some clothes lol i need some people who know java script i need help please reply if ya know some



Reply With Quote

