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

Advanced
-Collapse +Expand JavaScript Store

Prestwood eMagazine

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

   ► MB LobbyJavaScript and AJAX BoardJavaScript Topic   Print This    All Groups  

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
MS
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 12 years ago (Thread Starter)
Comment Quote
About decren -Collapse +Expand
Visit Profile
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=3761
Last Reply Posted 4/10/2007 1:35:00 AM)
Location=MS  
Joined=12 years ago   MB Posts=2  
Most Recent Post
decren
MS
Got it solved!!

var el = document.getElementById("textBox").value;
var cell1 = row.insertCell(1);
cell1.appendChild(document.createTextNode(el));
 Posted 12 years ago (Thread Starter)
Comment Quote
About decren -Collapse +Expand
Visit Profile
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
Location=MS  
Joined=12 years ago   MB Posts=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 (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1186A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #11612 Counter
3761
Since 4/2/2008

Follow PrestwoodBoards on: 


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