473,396 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Get value of textbox and copy to another text box

75 64KB
Hi,

how to get the value of textbox and copy to other textbox,

i just confuse thx
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. function getValue()
  6.   {
  7.   var x=document.getElementById("myHeader");
  8.   var y=document.getElementById("y");
  9. x.value = y.value;
  10.   alert(x.innerHTML);
  11.   }
  12. </script>
  13. </head>
  14. <body>
  15.  
  16. <h1 id="myHeader" onclick="getValue()">Click me!</h1>
  17. <h1 id="y">me!</h1>
  18. </body>
  19. </html>
  20.  
  21.  
Nov 14 '12 #1
4 4081
lyodmichael
75 64KB
sorry im wrong, thank for viewing,
Expand|Select|Wrap|Line Numbers
  1. textbox2.value = textbox1.value;
sorry again, but if you have other side comment just wright
Nov 14 '12 #2
acoder
16,027 Expert Mod 8TB
You mention a text box, but you're trying to change a H1 element which doesn't have a value.
Nov 14 '12 #3
lyodmichael
75 64KB
yeah, that's why i been apologizing,
Nov 15 '12 #4
acoder
16,027 Expert Mod 8TB
So, is the problem solved?
Nov 15 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Tony Cooke | last post by:
Hi all. I'm not sure why I'm having problems with this but if I try to retrieve the value of a readonly text form I get back that the object is undefined. The reason the text is readonly is...
6
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo...
1
by: Richard Hollenbeck | last post by:
How can I (if I can) display the sum of a text box values in the Detail in another text box in the page's footer? For example, I have a text box called "txtPoints" in the detail which displays...
31
by: Kathy | last post by:
I would like to get the old and new value for a change made to a text box so that I can store them in a change history table. What is the best way to do this? I am just learning VB 2005; porting...
0
by: tonyrb | last post by:
Hi all, First time posting here. I was able to do this in Visual Basic 6, but in VB 2005 Express I am having a hard time with drag'n'drop. Version I am using is Visual Basic 2005 Express. ...
5
by: Rex | last post by:
Hi, I want to change a value in one table depending on the value(s) in another table. I am trying to achieve this in a form. to elaborate I have a many-to-many relationship between tables...
1
by: DeanO | last post by:
I thought Me! text123 = Me! text122 would copy the text from text box 122 to text box 123 hovever does not work any suggestions?
5
by: vsteshenko | last post by:
Hello, This is my second post to the any usernet group and the first one was posted to the wrong one. I am currently working on creating an order form for sales associates at my work to be used...
2
by: VickyC | last post by:
Hello, I have a table that I have protected so that users are not able to edit directly into the table. I am wanting the users to click on Edit, which then opens a form, but I need to copy the...
1
by: sprad | last post by:
I try to copy value of textbox from one form to another textbox of another form when checkbox is checked. So did anybody have idea how to do it.Please reply me as soon as possible. Thanks..
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.