WebInput 4 Client Side Event OnChange does not fire

1 reply. Last post: January 7, 2010 1:54 AM by Glenn Layaar
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

The Client Side Event OnChange does not fire.

OnAfterValueChanged Event does fire.  Just change the OnChange Attribute Name to OnAfterValueChanged and it's value to WebInput1_OnAfterValueChanged.

This code was taken from the C# WebInputSamples, WebInputEvents.aspx.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="_Test_InterSoft_WebInput_Default3" %>

<%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls" TagPrefix="ISWebInput" %>

<!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></title>
</head>
<body>
	<form id="form1" runat="server">
	<div>

		<ISWebInput:WebInput
			ID="WebInput1"
			runat="server"
			Text="1.0"
			MaxLength="5"
			Width="40px"
			CssClass="StandardFont"
			NumericInput="True"
		>
			<CultureInfo CultureName="en-US"></CultureInfo>
			<DisplayFormat
				ErrorMessage="Enter a Valid Quantity"
				ErrorText="Enter a Valid Quantity"
				IsEnabled="True"
				Type="Number"
				Format="#,###.0"
			>
			</DisplayFormat>
			<TextBoxStyle>
				<Normal
					Font-Names="Times New Roman"
					Font-Size="10pt"
					HorizontalAlign="Right"
				>
				</Normal>
				<Over BaseStyle="Normal" />
				<Active BaseStyle="Normal" >
				</Active>
			</TextBoxStyle>
			<ClientSideEvents
				OnChange="WebInput1_OnChange"
			>
			</ClientSideEvents>
		</ISWebInput:WebInput>

	<script language="javascript">
		function WebInput1_OnAfterValueChanged(controlId)
		{
			alert("WebInput1_OnAfterValueChanged");
			var dv = document.getElementById("divStatus");
			dv.innerHTML = "OnAfterValueChanged event is triggered";
		}

		function WebInput1_OnChange(controlId)
		{
			alert("WebInput1_OnChange");
			var dv = document.getElementById("divStatus");
			dv.innerHTML = "OnChange event is triggered";
		}
	</script>

	<div class="text">
		<br />
		Current Event : 
		<span id="divStatus" style="font-style:italic">
		</span>
	</div>



	</div>
	</form>
</body>
</html>
All times are GMT -5. The time now is 2:34 PM.
Previous Next