Solved

using javascript to handle asp.net textchanged event?

Posted on 2006-06-30
1
2,906 Views
Last Modified: 2008-01-09
Hello experts I am trying to use javascript to handled the text changed event of one of my asp.net textboxes and set the value of a asp.net label equal to the textbox.  I am using asp.net 1.1 how can i do this with javascript?  I could do all of this server side, but then I get the post backs, which I dont want.  Below i tried setting a attribute in the page load event

code behind
 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        txtpackage.Attributes.Add("TextChanged", "textboxchanged();")
    End Sub

Html
      <script language="javascript">
            function textboxchanged(){
            document.Form1.lbllabel.value = document.Form1.txtpackage.value
            }
            </script>
0
Comment
Question by:tentavarious
1 Comment
 
LVL 3

Accepted Solution

by:
Justin_Case_77 earned 125 total points
ID: 17022813
txtpackage.Attributes.Add("onChange", "textboxchanged();")
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question