textbox text changehttp://forums.asp.net/t/962410.aspx/1?textbox+text+changeMon, 13 Jul 2009 16:47:03 -04009624101196313http://forums.asp.net/p/962410/1196313.aspx/1?textbox+text+changetextbox text change i have been searching everywhere for a solution to my problem but havent been able to come up with one.<br> <br> i want to reduce the results of a list i print to a page as i type text into a textbox something based on the results printed. so i need to run a function each time the text changes. i tried to do this with OnTextChanged=&quot;true&quot; and AutoPostBack=&quot;true&quot; in the textbox but this only fires the event when i get out of the textbox.<br> <br> I have been trying to get to grips with the atlas beta and have used the AutoCompleteExtender but it wont work for my purposes because i need access to a radio list control which i cant pass into a WebService Function.<br> 2006-02-13T11:29:01-05:001196867http://forums.asp.net/p/962410/1196867.aspx/1?Re+textbox+text+changeRe: textbox text change <p>You should handle the onkeypress client-side event of the textbox.&nbsp; That should be all you need.&nbsp; In that client-side event handler, get the current textbox.value and do an AJAX callback to your server-side method for results, then update your radio list according to what's returned.</p> <p>Hope that helps.</p> <p>Best regards,<br> Jarred</p> 2006-02-13T19:02:56-05:001198804http://forums.asp.net/p/962410/1198804.aspx/1?Re+textbox+text+changeRe: textbox text change how do i actually go about that? i find it very hard to understand the client side of atlas because there is no autocomplete or API<br> 2006-02-15T12:40:51-05:001199092http://forums.asp.net/p/962410/1199092.aspx/1?Re+textbox+text+changeRe: textbox text change <p>Don't use the &quot;Atlas API&quot;.&nbsp; Just use standard JavaScript, and add a handler for onkeypress to the input, as such:<br> <br> &lt;input type=&quot;text&quot; id=&quot;myTextBox&quot; onkeypress=&quot;myJavaScriptHandlerFunction();&quot; /&gt;</p> <p>And you're done.&nbsp; Inside that handler function, pass the textbox.value to an AJAX/Atlas callback function to get server results.</p> <p>Understand?</p> <p>Jarred</p> 2006-02-15T16:06:05-05:001199198http://forums.asp.net/p/962410/1199198.aspx/1?Re+textbox+text+changeRe: textbox text change <p>Hi,</p> <p>are you using an auto-complete TextBox or a simple TextBox to do this? I don't understand if you want to update the list each time a character is typed into the TextBox or when an item is chosen from the completion list.</p> 2006-02-15T17:07:55-05:001199224http://forums.asp.net/p/962410/1199224.aspx/1?Re+textbox+text+changeRe: textbox text change <p>I am confident he wants the former, w/ each character typed.&nbsp; My solution is the way to accomplish this.</p> <p>Jarred</p> 2006-02-15T17:20:08-05:001199324http://forums.asp.net/p/962410/1199324.aspx/1?Re+textbox+text+changeRe: textbox text change got it working!<br> <br> thanks for your help people. the onkeypressed is exactly what i needed<br> 2006-02-15T18:22:30-05:001208087http://forums.asp.net/p/962410/1208087.aspx/1?Re+textbox+text+changeRe: textbox text change <p>Jarred,</p> <p>I wanna call a server side method from a javascript funtion, would you pls help me that.</p> <p>When i call the following code from aspx file , i gets error TestSearch undefined whereas TestSearch.doSearch() is defined in codebehind, Make sure its not a webserivce call.</p> <p>I would really appreciate you.</p> <p>Note: I have script library and atlas.dll in the project.</p> <p>Thanks!</p> <p><font color="#000000" size="2">&lt;script type=&quot;text/javascript&quot; &gt; </font></p> <p><font color="#000000" size="2">function callSearch() { this is called from a button.</font></p> <p><font color="#000000" size="2"><font color="#0000ff">TestSearch.doSearch(OnComplete,OnTimeOut);</font>&nbsp; </font></p> <p><font color="#000000" size="2">}</font></p> <p><font color="#000000" size="2">function OnComplete(result) {</font></p> <p><font color="#000000" size="2">alert(result);</font></p> <p><font color="#000000" size="2">}</font></p> <p><font color="#000000" size="2">function OnTimeOut() {</font></p> <p><font color="#000000" size="2">alert(&quot;Timed Out&quot;); </font></p> <p><font color="#000000" size="2">}</font></p> <p><font color="#000000" size="2">&lt;/script&gt;</font><font color="#008000" size="2"></p> <font color="#0000ff" size="2"><font size="2"> <p></font></font><font color="#000000"></font></font>&nbsp;</p> 2006-02-23T21:13:41-05:001209079http://forums.asp.net/p/962410/1209079.aspx/1?Re+textbox+text+changeRe: textbox text change I'm curious, is there a way to use the onKeyPress method where it wouldn't fire immediately, say wait 300 miliseconds to see if there are further changes. I don't want it to fire in the midst of typing a word, only when the user is done or has paused.<br> <br> I'm basically trying to accomplish what &quot;onChange&quot; accomplishes without having to leave the control.<br> 2006-02-24T17:43:40-05:001209606http://forums.asp.net/p/962410/1209606.aspx/1?Re+textbox+text+changeRe: textbox text change Hi,<br> <br> <blockquote><span class="icon-blockquote"></span> <h4>dleffel</h4> <br> I'm curious, is there a way to use the onKeyPress method where it wouldn't fire immediately, say wait 300 miliseconds to see if there are further changes.<br> </blockquote> <br> nice suggestion. I've coded an Atlas behavior based on your requirement. You'll find the code <a href="http://aspadvice.com/blogs/garbin/archive/2006/02/25/15360.aspx">here</a>.<br> 2006-02-25T09:40:20-05:001209783http://forums.asp.net/p/962410/1209783.aspx/1?Re+textbox+text+changeRe: textbox text change This is EXCELLENT. Thanks!<br> 2006-02-25T17:46:26-05:001252254http://forums.asp.net/p/962410/1252254.aspx/1?Re+textbox+text+changeRe: textbox text change <p><font face="Arial">Really really nice one!!</font></p> <p><font face="Arial">Thanks for the code, and the explanations with it&nbsp;!</font></p> 2006-04-09T07:34:37-04:001348454http://forums.asp.net/p/962410/1348454.aspx/1?Re+textbox+text+changeRe: textbox text change <p>Hi! I got a similar problem. </p> <p>I need that an atlas update panel refreshes when the text value in a textbox Controls changes. </p> <p>I have a trigger that works fine when I type text in the textbox. So far so good.</p> <p>However, the textbox can also be filled by a javascript function that runs on a calendar&nbsp;popup. In this case no event is thrown and my panel isn't updated. So what can I do to handle that change on the text? </p> <p>Here is some of&nbsp;the code:&nbsp;</p> <p><br> &lt;asp:TextBox ID=&quot;TextBoxDate&quot; runat=&quot;server&quot; OnTextChanged=&quot;TextBoxDate_TextChanged&quot; Width=&quot;155&quot; AutoPostBack=&quot;true&quot; &gt;<br> &lt;atlas:UpdatePanel runat=&quot;server&quot; ID=&quot;pnlSchedule&quot; Mode=&quot;Conditional&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;Triggers&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;atlas:ControlValueTrigger ControlID=&quot;TextBoxDate&quot; PropertyName=&quot;Text&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;atlas:ControlEventTrigger ControlID=&quot;TextBoxDate&quot; EventName=&quot;TextChanged&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;/Triggers&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;ContentTemplate&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;asp:Table ID=&quot;tabletoUpdate&quot; runat=&quot;server&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;/asp:Table&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ContentTemplate&gt;<br> &lt;/atlas:UpdatePanel&gt;</p> <p>&nbsp;</p> 2006-07-21T22:45:16-04:003290624http://forums.asp.net/p/962410/3290624.aspx/1?Re+textbox+text+changeRe: textbox text change <p>&nbsp;am new to ajax and havent done any sort of javascipting prior to this</p> <p>i TOO have been searching everywhere for a solution to my problem but havent been able to come up with one. i want to reduce the results of a list i print to a page as i type text into a textbox something based on the results printed. </p> <p>i need to run a function each time the text changes. i tried to do this with OnTextChanged=&quot;true&quot; and AutoPostBack=&quot;true&quot; in the textbox but this only fires the event when i get out of the textbox. </p> <p>these controls lie in a user control.</p> <p>i have this a script as in the user control page:</p> <pre class="prettyprint">function FilterDDL() { if (Trim(txtAreaCode.Text)) != &quot;&quot; { var lb as new listbox var s int s = 0 for(s = 0 ; s &lt; lstAreaCode.Items.Count-1 ; s=s&#43;1) { if (InStr(lstAreaCode.Items(s).ToString, txtAreaCode.Text) = true) {lb.Items.Add(ListBox1.Items(s)) ; } } lstAreaCode.Items.Clear(); for(s = 0; s &lt;lb.Items.Count - 1;s=s&#43;1) { lstAreaCode.Items.Add(lb.Items(s).ToString); } lb.Dispose(); } }</pre> <p>i have installed ajax control toolkit and work on vs 2005. <br> </p> 2009-07-13T16:47:03-04:00