Solved

How can I get asp.net element via javascript??

Posted on 2006-07-02
2
233 Views
Last Modified: 2010-04-17
<http>
      <head>
            <script language="javascript">
                  function GetString()
                  {
                        var add = document.getElementById("byStr");
                                add += "World";
                  }
            </script>
      </head>
      <body>
            <input type="text" id="btStr" value="Hello"/>
            <input type="button" id="btOK" value="OK" onclick="GetString()"/>

      </body>
</http>


I click the button but nothing happen.
I want the text expose "Hello World" after click the button
0
Comment
Question by:tatamaruri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
Rimvis earned 500 total points
ID: 17029359
You have a typo in your code
var add = document.getElementById("byStr");
should be
 var add = document.getElementById("btStr");

0
 

Author Comment

by:tatamaruri
ID: 17029391
thanks.
IT is stupid mistake
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Six Sigma Control Plans

728 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