intro: I am pretty sure this is my fault. But I just don’t see it and before tearing my hair out, I thought I should ask here 😉
I have a button which looks like this in my ASPX:
<input onClick='ELB_ClearSelection('DropDownList___00178');' type='Button' value='Clear' />
The HTML that is generated says:
<input onClick='ELB_ClearSelection('DropDownList___00178');' type='Button' value='Clear' />
…which obviously does not work 🙁
I ran the thing through HTML Validator and apart from the ‘usual’ complaints (related to it not fully ‘understanding’ ASPX) I did not see anything special, I have progrrammatically checked for balanced quotes and did not see anything suspicious, so I have no ideas where to look further 🙁
In case it helps, here is the full ASPX:
<%@ Register tagPrefix='des' assembly='PeterBlum.DES' namespace='PeterBlum.DES' %> <%@ Register tagPrefix='despval' assembly='PeterBlum.DES.NativeToDES' namespace='PeterBlum.DES.NativeToDES' %> <%@Page Language='apl' Debug='true' Inherits='COPA' src='COPA_MS.dws' %> <%@ Register TagPrefix='mbcbb' Namespace='MetaBuilders.WebControls' Assembly='MetaBuilders.WebControls.ComboBox' %> <%@ Register TagPrefix='ELB' Namespace='ELB' Assembly='EasyListBox' %> <html><head> <meta name='date' content='2009-01-03T10:55:39' /> <meta name='generator' content='COPA_MS.DWS' defs='(11)(13)(14)' /> <meta name='publisher' content='Dynamic Logistics Systems GmbH' /> <meta http-equiv='content-type' content='text/html; charset=ISO-8859-1' /> <title> COPA_MS - Dispogruppen </title> <link rel='stylesheet' type='text/css' href='./copa.css' /> <script language='javascript' type='text/javascript' src='custom-form-elements.js'></script> </head><body> <h1> <span class='copa'>COPA-</span><span class='ms'>MS:</span> Dispogruppen </h1> <form runat=server><des:PageSecurityValidator id='PageSecurityValidator1' runat='server' > </des:PageSecurityValidator> <input runat='server' type='hidden' NAME='SelMaskeId' value='11' ID=SelMaskeID> <input runat='server' type='hidden' NAME='TreffId' value='13' ID=TreffID> <table> <tr> <td valign='top'><asp:Label runat='server' ID='Label__________00176' Text='Code Dispogruppe' /> </td><td><elb:EasyListBox runat='server' ID='ComboBox_______00176' Text='' MaxLength='6' Width='100' SelectQuery='***' ConnectionStringSqlServer='xxx' DataValueField='code' DataTextField='code' DisplayMode='Combo' LimitToList='false' ></elb:EasyListBox></td> </tr><tr> <td valign='top'><asp:Label runat='server' ID='Label__________00177' Text='Bezeichnung' /> </td><td><elb:EasyListBox runat='server' ID='ComboBox_______00177' Text='' MaxLength='50' Width='210' SelectQuery='***' ConnectionStringSqlServer='xxx' DataValueField='bez' DataTextField='bez' DisplayMode='Combo' LimitToList='false' ></elb:EasyListBox></td> </tr><tr> <td valign='top'><asp:Label runat='server' ID='Label__________00178' Text='Lieferant' /> </td><td><elb:EasyListBox runat='server' ID='DropDownList___00178' Text='' MaxLength='0' Width='210' SelectQuery='***' ConnectionStringSqlServer='xxx' DataValueField='id' DataTextField='bez'></elb:EasyListBox> <input type='Button' value='Auswahl entfernen' onClick='ELB_ClearSelection('DropDownList___00178');' /> </td> </tr><tr> <td valign='top'><asp:Label runat='server' ID='Label__________00182' Text='Dispo-Verfahren' /> </td><td><elb:EasyListBox runat='server' ID='DropDownList___00182' Text='' MaxLength='0' Width='280 ' Tref_Width='280' Tref_MaxLength='200' s_left='' s_top='' s_position='' css_sl='' css_tl='' css_dt='' SelectQuery='***' ConnectionStringSqlServer='xxx' DataValueField='id' DataTextField='bez'></elb:EasyListBox> <input type='Button' value='Auswahl entfernen' onClick='ELB_ClearSelection('DropDownList___00182');' /></td> </tr> </table><br /><br /> <asp:Button runat='server' ID='Button_Suchen' Text='Suchen' onClick='CatchAll_onClick' /> </form> </body> </html>
Change this:
To this:
In your ASPX.
I’ll avoid commenting on having select queries and login information for your DB in your markup!