I.T. Discussion Community!
-Collapse +Expand
JavaScript
Search JavaScript Group:

Advanced
-Collapse +Expand JavaScript Store

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyJavaScript and AJAX BoardJavaScript Topic   All Groups   Print This   

need guidance to transfer text from one table to a

need guidance to transfer text from one table to a in JavaScript topic (part of our JavaScript and AJAX group).

Quick Search: guidance   transfer   guidance   guidance transfer   text one   table a  

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

// cell 1 - input text
document.getElementById("Table1");
var el=document.getElementById("textBox").cloneNode(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.getElementById("Table1");
var el = document.getElementById("textBox").innerHTML;
var cell1 = row.insertCell(1).textBox(el);

any assistance would be appreciated...
 Posted 7 years ago (Thread Starter)
Comment Quote
Location=MS ,  Joined=7 years ago   MB Posts=2  
More... -Collapse +Expand
decren
MS
Rank: Cadet 1st Year
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.
Post ID #11612, 1 replies
Thread Started 3/25/2007 6:41:00 AM
View Counter=2160
Last Reply Posted 4/10/2007 1:35:00 AM)
Most Recent Post

decren
Got it solved!!

var el = document.getElementById("textBox").value;
var cell1 = row.insertCell(1);
cell1.appendChild(document.createTextNode(el));
 Posted 7 years ago (Thread Starter)
Comment Quote
Location=MS ,  Joined=7 years ago   MB Posts=2  
More... -Collapse +Expand
decren
MS
Rank: Cadet 1st Year
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.
Post ID #11620 (Level 1.1)  Reply to 11612
Thread Started 4/10/2007 1:35:00 AM
View Counter=2

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post:

Enter your name and security key.

Your Name:
Today's security key = P234A
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #11612 Counter
2160
Since 4/2/2008
-
  Load Time=less than 1 second.
 
Print This


-
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


982 People Online Now!!  
Sign In to see who's online now!  Not a member? Join now. It's free!
Show more stats...
Follow PrestwoodBoards on: 


©1995-2014 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech