A
Alex
Hi. I have this html
<body scroll="auto">
<form id="Ratings" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="Server"
EnableScriptGlobalization="true" EnableScriptLocalization="true" />
<div align="center">
<br />
<asp:Table
ID="tblFilterBy"
Width="40%"
.......
runat="server" >
<asp:TableHeaderRow runat="server">
<asp:TableHeaderCell Font-Bold="false" ForeColor="#000000"
ColumnSpan="3" runat="server">
<font style="font-size:medium; font-weight:bold">
Filter list by...
</font>
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow ID="TableRow_FilterBy" runat="server">
<asp:TableCell ID="TableCell_FilteryPIN" Width="40%" runat="server"
HorizontalAlign="Center" ToolTip="Filter by PIN" >
<asp:TextBox
Width="25%"
ID="TextBoxFilterByPIN"
CssClass="unwatermarked"
OnTextChanged="javascript:document.forms[0].
['cmdRemoveFilter'].disabled=(this.value=='');"
runat="server"
/>
<br />
<ajaxToolkit:TextBoxWatermarkExtender
ID="TextBoxWatermarkExtender1"
runat="server"
TargetControlID="TextBoxFilterByPIN"
WatermarkText="PIN"
WatermarkCssClass="watermarked"
Enabled="True"
/>
<asp:Button ID="cmdFilter" Width="35%" Text="Filter"
runat="server" ValidationGroup="Filter" />
<br />
<asp:Button ID="cmdRemoveFilter" Width="35%" Text="Show All"
runat="server"/>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
etc, etc, etc.
Now... to me, the line
OnTextChanged="javascript:document.forms[0].
['cmdRemoveFilter'].disabled=(this.value=='');"
looks fine. Still, the compiler says:
C:\Data\...\Ratings\Ratings.aspx(46,0): error BC30456: 'javascript' is
not a member of 'ASP.ratings_aspx'.
C:\Data\...\Ratings\Ratings.aspx(46,0): error BC30451: Name 'document'
is not declared.
C:\Data\...\Ratings\Ratings.aspx(46,0): error BC30203: Identifier
expected.
Sorry, I don't get it - what's wrong with that line ? I simply want to
disable the button "cmdRemoveFilter" if the textbox
"TextBoxFilterByPIN" becomes empty.....
Thank you very much for reading this.
Alex.
<body scroll="auto">
<form id="Ratings" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="Server"
EnableScriptGlobalization="true" EnableScriptLocalization="true" />
<div align="center">
<br />
<asp:Table
ID="tblFilterBy"
Width="40%"
.......
runat="server" >
<asp:TableHeaderRow runat="server">
<asp:TableHeaderCell Font-Bold="false" ForeColor="#000000"
ColumnSpan="3" runat="server">
<font style="font-size:medium; font-weight:bold">
Filter list by...
</font>
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow ID="TableRow_FilterBy" runat="server">
<asp:TableCell ID="TableCell_FilteryPIN" Width="40%" runat="server"
HorizontalAlign="Center" ToolTip="Filter by PIN" >
<asp:TextBox
Width="25%"
ID="TextBoxFilterByPIN"
CssClass="unwatermarked"
OnTextChanged="javascript:document.forms[0].
['cmdRemoveFilter'].disabled=(this.value=='');"
runat="server"
/>
<br />
<ajaxToolkit:TextBoxWatermarkExtender
ID="TextBoxWatermarkExtender1"
runat="server"
TargetControlID="TextBoxFilterByPIN"
WatermarkText="PIN"
WatermarkCssClass="watermarked"
Enabled="True"
/>
<asp:Button ID="cmdFilter" Width="35%" Text="Filter"
runat="server" ValidationGroup="Filter" />
<br />
<asp:Button ID="cmdRemoveFilter" Width="35%" Text="Show All"
runat="server"/>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
etc, etc, etc.
Now... to me, the line
OnTextChanged="javascript:document.forms[0].
['cmdRemoveFilter'].disabled=(this.value=='');"
looks fine. Still, the compiler says:
C:\Data\...\Ratings\Ratings.aspx(46,0): error BC30456: 'javascript' is
not a member of 'ASP.ratings_aspx'.
C:\Data\...\Ratings\Ratings.aspx(46,0): error BC30451: Name 'document'
is not declared.
C:\Data\...\Ratings\Ratings.aspx(46,0): error BC30203: Identifier
expected.
Sorry, I don't get it - what's wrong with that line ? I simply want to
disable the button "cmdRemoveFilter" if the textbox
"TextBoxFilterByPIN" becomes empty.....
Thank you very much for reading this.
Alex.