Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag 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);
}
SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zachvaldez

ASKER

I use an asp.net control textbox with mulitiline property.
the textbox is also inside a table within a tr,td
did you tried the code?
It adds the column to the right.
Is it possible that when it adds it adds a row below not across/column. thanks
What is your initial question?
If you have additional question please open a new question.
Yeah but it copies to the right.
So create a new question, the purpose of this site is to have a database of question with then answer
It will be the same question but with a different flavor.
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.
Yes so use a better question title
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
thanks