?
Solved

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

Posted on 2006-07-02
2
Medium Priority
?
234 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Starting up a Project

770 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