473,785 Members | 2,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To Carry Over Text Values (Simple Solution?)

chunk1978
224 New Member
hi there... i'm trying to make one text field contain the value of another... i'm assuming there's a really simple solution... here's a code i quickly wrote to further explain my issue:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  5. <title>Untitled Document</title>
  6. </head>
  7. <script type="text/javascript">
  8.  
  9. function Carry
  10.     {document.form1.textfield2.value = document.form1.textfield.value;}
  11.  
  12. </script>
  13.  
  14. <body>
  15. <form id="form1" name="form1" method="post" action="">
  16. <p>
  17.   <input name="submit" type="button" id="submit" value="Carry Over Value" onclick="Carry();" />
  18. </p>
  19. <p>
  20.   <input name="textfield" id="textfield" type="text" value="Duplicate me!" />
  21.   <input name="textfield2" id="textfield2" input type="text" value="Erase me!"/>
  22. </form>
  23. <p>&nbsp;</p>
  24. </body>
  25. </html>
  26.  
thanks in advance! :-)
Feb 20 '07 #1
3 2179
chunk1978
224 New Member
oh... i forgot the "()" at the end of the JS function... but still, the result is the same [still doesn't work] when added...
Feb 20 '07 #2
chunk1978
224 New Member
nevermind... seems to be working now (???)...

dumb...
Feb 20 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
I know it was only an example, but you shouldn't use 'submit' for a normal button to avoid confusion.
Feb 20 '07 #4

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

Similar topics

9
11831
by: fleemo17 | last post by:
I'm hoping a CSS guru can help me with what seems like a simple enough goal. What I'm going for is a large photo centered in the browser with text positioned on top of it. Using the CSS below, when the user resizes their browser window, the photo centers in the browser fine but the text box stays locked on the left hand side. Is there a way to have the text box move in relation to the photo when the browser is resized? Here's my CSS:
2
8985
by: Almir | last post by:
I have a simple problem, i just can get a grasp on it. I designed a database for inventory of computer equipment. Now i created forms for each table. Each piece of equipment is going to come in an order. ORDERS --> ORDER CONTENTS --> DEVICES --> CPUS --> PRINTERS --> NETWORK HARDWARE You get the picture. I want to make the updating easy. I start from ORDERS table enter all the common information, then ORDER CONTENTS table and get all...
2
3005
by: Paul Malcomson | last post by:
Hi. I'm having terrible trouble with a form that displays several parent/child relationships at one time. It is a sales force hierarchy - Sales force, district, territory, sales rep are the tables linked in parent/child relationships. I'm using a form to choose the main-parent and then several subforms in datasheet view.
16
4063
by: archilleswaterland | last post by:
Hi, I am using a compiler that does not support long int (32 bits) so I am using 2 int's to do the work my problem int a; int b; int c;
6
2083
by: Lelle | last post by:
Hello ! how can i insert text containg code examples from a textbox into a database using SQL insert statment. i have no problem to just add text that dont contains code and script examples or the illegal chars for the insert command is it possible to encasulate the text/string so the server doesnt reads the string as a command?
7
1439
by: gordon | last post by:
Hi, I have a series of forms that collect information from a user. When I write out my information to a text file after the last file, the values of the previous forms seem to be blank. I would like to retain the values of names.textbox1.text and names.textbox2.text for the output file. Any help greatly appreciated.
1
1565
by: Prabhudhas Peter | last post by:
Hello, Need an easy way to Display the property values of an object (dynamically) ie I need to show the values of an Object in a rich text box. Background : We have a form, with a rich text box, where we want to display the values of any given object (say customer, order etc). We declared (Dim Obj as New Object) and assigned our application object. Now we want to print
5
3949
by: campbellbrian2001 | last post by:
I'm trying to get the "Carry data over to new record" code to work from Allen Browne's site: http://allenbrowne.com/ser-24.html I follwed the instruction explicitly and somethings not working... any clues? Thanks all!! Brian
7
2195
by: Phuff | last post by:
Apparently if you have any duplicates in your Value collection the selected index that is maintained through the state defaults to the first index in that group of duplicates. So my items correspond to the Box_Id in the table (the unique identifier in the DB). There are 8 boxes, 1-8. Then I grab a business related date and fill the Value collection with this, that date corresponds to something with each box. The dates (which become...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10095
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8978
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.