Avatar of zachvaldez
zachvaldez
Flag for United States of America asked on

Modify this javascript

This function copiies down a textbox. It clones it however, I prefer to get a blank /or no contents of teh copied textbox..

function addTextbox(theBoxID){
 theBox = Document.GetElementById(theBoxID);
 theParent = theBox.parentNode;
 newBox = theBox.CloneNode(true);
 theParent.appendChild(newBox);
}
JavaScript

Avatar of undefined
Last Comment
zachvaldez

8/22/2022 - Mon
SOLUTION
leakim971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
leakim971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
zachvaldez

ASKER
I use an asp.net control textbox with mulitiline property.
zachvaldez

ASKER
the textbox is also inside a table within a tr,td
leakim971

did you tried the code?
Your help has saved me hundreds of hours of internet surfing.
fblack61
leakim971

zachvaldez

ASKER
It adds the column to the right.
Is it possible that when it adds it adds a row below not across/column. thanks
leakim971

What is your initial question?
If you have additional question please open a new question.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
zachvaldez

ASKER
Yeah but it copies to the right.
leakim971

So create a new question, the purpose of this site is to have a database of question with then answer
zachvaldez

ASKER
It will be the same question but with a different flavor.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
zachvaldez

ASKER
First of all it clones it but it also clones the values in the textbox.
For some reasons, this line

newBox.value = "";
  does not clear my values in the textbox copied.
leakim971

Yes so use a better question title
leakim971

Right click on your page, choose view source and post it here. You said it work in your previous post, I would like to know why it suddenly stop working
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
zachvaldez

ASKER
thanks