473,666 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

need guidance to transfer info from one table to another

11 New Member
Hello,
I have a form with 4 tables. Table 1 & 2 are not associated with my problem so I'll start with Table3.

Table3 contains an input-textbox; and a push-button to add a new row to Table4. The button also activates a script to transfer the information in the text-box to the new cell in Table4. I originally used cloneNode which works fine:

// cell 1 - input text
document.getEle mentById("Table 3");
var el=document.get ElementById("te xtBox").cloneNo de(true);
var cell1 = row.insertCell( 1).appendChild( el);

but I only want to transfer the text (not the text-box.) I tried to adapt innerHTML, but am having trouble doing so. What am I doing wrong?:

// cell 1 - input text
document.getEle mentById("Table 3");
var el = document.getEle mentById("textB ox").innerHTM L;
var cell1 = row.insertCell( 1).textBox(el);

any assistance would be appreciated...

The form address is as follows with "tbNOR" being the name of the textBox:

http://www.aaronzjukeb ox.com/R2CDorder1
Apr 7 '07 #1
3 1563
DutchKingCobra
37 New Member
Hi pal
Maybe this will help you!
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <!-- Created on: 9-4-2007 -->
  3. <head>
  4.    <title></title>
  5. <script type="text/javascript">
  6. // author : fjhdehoog
  7. function test(){
  8. //document.getElementById("Table3");
  9. el=document.getElementById("textBox").value; 
  10. //get the table by id and assign to varaible
  11. Destinantiontable=document.getElementById("Table4");
  12. //get the table    firstchild , in this case <tbody>
  13. ThaTableBody = Destinantiontable.firstChild; 
  14. //set newrow to be made
  15. NewRow = document.createElement("tr");
  16. //set newcell to be made
  17. NewCell = document.createElement("td");
  18. //set the text to be entert
  19. txt=document.createTextNode(el);
  20. //when newcell is made enter the text
  21. NewCell.appendChild(txt);    
  22. //when newrow is made enter the newcell
  23. NewRow.appendChild(NewCell);
  24. //make the row and add the new cell and insert the text
  25. ThaTableBody.appendChild(NewRow); 
  26. }
  27.  </script>
  28. </head>
  29. <body> 
  30.  
  31. <table border="2" id="Table3" summary="">
  32. <tr><form id="form1">
  33.     <td><input type="text" name="textbox" size="40" maxlength="256" value="test"></td>    
  34.     <td><input type="button" value="send" onclick="test()"></td>
  35.     </form>
  36. </tr>
  37. </table>
  38. <br>
  39. <br>
  40. <table id="table4" border="2" summary="">
  41. <tr>
  42.       <td></td>
  43. </tr>
  44. </body>
  45. </html>
  46.  
well HTH
peace
Apr 9 '07 #2
decren
11 New Member
Many Thanks for your quick response. And I also appreciate the time and effort you must have spent on that excellent code. It sure works for me.
Apr 10 '07 #3
DutchKingCobra
37 New Member
hahaha,
no problem mate.

What is knowlegde worth if u don´t share it :).
anyway glad i could help.
happy coding
peace
Apr 10 '07 #4

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

Similar topics

0
1415
by: Dan McCoy | last post by:
I'm new to MYSQL, having just finished my website. I have 1 thing left to try and do to make the site experiance as seemless as possable, but to do it I figure I need to do some sort of mysql programming. Following is a post I made elsewhere. "I use phpnuke platinum (asfar as I can tell its phpnuke but with some addons). I am adding the phpmychat to the site. However I need to be able to create and remove chat accounts quickly on it....
8
4069
by: Christan | last post by:
I am currently taking a db course and my class is paired us into groups of 4s and our instructor had us download a template from the microsoft Access site for education to create and modify a database for a made up school. This was our objective as it was from a business asking for our team. St. Marys School is an educational establishment who recently decided to convert from paper to technology. A earlier Database was used by inputing...
2
1470
by: Tim Marsden | last post by:
Hi, Please excuse me, I am complete ASP novice. I use VB.NET in VS 2003. I am trying to achieve the following. Display a list of items, this list needs to be user specific, so my first question is How do I obtain the user Id of the person? This will run on a intranet. Then, based on the option selected, display 1 or more Text Boxes to capture info. The number of boxes will vary, so Can I add controls to a web form at
15
4597
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
5
2022
by: rajaaryan44 | last post by:
how can we transfer data from one access database to another databse . the table name is same for both the database . in one table some records are there (rs say e.g.) now another table has say rs+10 records . now i have to pass there 10 values to another table with same name . can anyone help me with this . can anyone tell me how to transfer records using codes . please
2
2159
by: rajaaryan44 | last post by:
how can we transfer data from one access database to another databse . the table name is same for both the database . in one table some records are there (rs say e.g.) now another table has say rs+10 records . now i have to pass there 10 values to another table with same name . can anyone help me with this. i m usinf DAO . i wrote some codes in dao. i created a function : AddTableField i m writing it in module so that it can be access from...
9
1408
by: Jonathan Wood | last post by:
Greetings, My app displays users in a GridView control. I'd like to have the name field shown in each row of this control a link that displays another page with information about that user. But I'm not sure how to approach this. How would I tell the target page which user to display? I'd prefer not to pass the user's ID on the URL, and I don't know when I'd get a chance to set a Session variable.
6
1863
by: smk17 | last post by:
I've spent the last few minutes searching for this question and I found an answer, but it wasn't quite what the client wanted. I have a simple online form where the user needs to fill out five fields out of nine. The other four are already there and filled out for the user. When they hit submit, all data is sent to us. But, if they desire (for whatever reason) the user can possibly delete what is already there and fill in something...
1
3203
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the code for attachment, I am not able to send anything. I get blank email. Can you please help me on this? Here is the html form:
0
8440
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
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
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...
0
8780
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8636
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7378
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
6189
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
5661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.