[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Modify this javascript

Posted on 2013-01-04
15
Medium Priority
?
157 Views
Last Modified: 2013-01-10
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);
}
0
Comment
Question by:zachvaldez
  • 8
  • 7
15 Comments
 
LVL 83

Assisted Solution

by:leakim971
leakim971 earned 1000 total points
ID: 38744806
function addTextbox(theBoxID){
 theBox = Document.GetElementById(theBoxID);
 theParent = theBox.parentNode;
 newBox = theBox.CloneNode(true);
newBox.value = "";
 theParent.appendChild(newBox);
}
0
 
LVL 83

Accepted Solution

by:
leakim971 earned 1000 total points
ID: 38744826
0
 

Author Comment

by:zachvaldez
ID: 38744944
I use an asp.net control textbox with mulitiline property.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:zachvaldez
ID: 38744965
the textbox is also inside a table within a tr,td
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38744969
did you tried the code?
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38744974
0
 

Author Comment

by:zachvaldez
ID: 38745094
It adds the column to the right.
Is it possible that when it adds it adds a row below not across/column. thanks
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38745109
What is your initial question?
If you have additional question please open a new question.
0
 

Author Comment

by:zachvaldez
ID: 38745141
Yeah but it copies to the right.
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38745153
So create a new question, the purpose of this site is to have a database of question with then answer
0
 

Author Comment

by:zachvaldez
ID: 38745175
It will be the same question but with a different flavor.
0
 

Author Comment

by:zachvaldez
ID: 38745183
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.
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38745184
Yes so use a better question title
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38745200
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
0
 

Author Closing Comment

by:zachvaldez
ID: 38765935
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question