cheers gits!
It does clone as expected, but there is one issue. If I fill out the fields and then clone, the field values are also filled in for the clone. I need for the new copy to be a clean slate.
I tried cloneNode(false ) but that does nothing
Another problem is that my calculations only work on the original copy of the form.
Odd
User Profile
Collapse
-
Hi Gits :)
Thanks for your reply. I have posted my code here:
1. No matter which way I try, the calculations only work within the scope of a form.
2. I'd like to use innerHTML instead of inputs for the "each" fields, but cant get that working
3. Totally lost on how to clone the entire table
Any ideas?Leave a comment:
-
Field Calculations with Scope
Howdy, Scripters :)
Im trying to update fields and dom elements based on form inputs:
[HTML]<form action="whateve r">
<fieldset class="calc">
<input type="text" class="charge" />
<input type="text" class="cost" />
<input type="text" class="profit" />
</fieldset>
... -
JS Slide Reveal with Class Change on Parent
I have a bunch of headers listed on my page. When you click on them, I would like hidden content to slide down from them. I have seen this done in various JS frameworks, but one thing none of them seem to do successfully is change the class of the parent header.
In my case I have little plus signs next to headers thanks to CSS styling. I would like them to change to minus signs when the content is revealed.
As I said... -
-
Thanks for the pointers guys!
I almost got this working... have a look
...Code:var list = {'Annual Report': 1, 'Book': 1, 'Catalog': 1, 'Look Book': 1, 'Magazine': 1}; if (this.value in list) { document.getElementById('binding').style.display = 'block'; } else { document.getElementById('binding').style.display = 'none';} if (this.value = 'Brochure')Leave a comment:
-
Dynamic Select Onchange
I am trying to show/hide elements based on the currently selected option. I have a rough idea of how to do this, but am having trouble with my javascript syntax.
Here is the basic logic behind what I am trying to accomplish:
1. All divs specified here will start off hidden
2. If currently selected option = Books || Catalogs || Magazines || Newspapers, then show div#binding
3. If currently selected option...
No activity results to display
Show More
Leave a comment: