How to handle OnSelectedIndexChanged ?

  • Thread starter Søren M. Olesen
  • Start date
S

Søren M. Olesen

Hi

I have an asp:listbox on a aspx page, which is set to runat="server"
however, I'd like to handle the OnSelectedIndexChanged in client-side code,
but I get an error on load of the page each time I try to setup an
eventhandler.....what am I doing wrong? Or is it just not possible?

TIA

Søren

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="dppSearch.aspx.vb" Inherits="DPP.dppSearch"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>dppSearch</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<script language="javascript" src="dxp_script/functions.js"
type="text/javascript"></script>
<script language="JavaScript">
function clkOpenPrice() {
alert("SMO");
}
</script>
</HEAD>
<body bgColor="#003399" MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:listbox id="lbResult" style="Z-INDEX: 103; LEFT: 88px; POSITION:
absolute; TOP: 48px" Width="640px" Height="128px" Runat="server"
AutoPostBack="False" OnSelectedIndexChanged="clkOpenPrice();">
</asp:listbox></form>
</body>
</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top