- remove and show back a field
- Posted by derya on June 26th, 2008
Hi guys,
I found below script from here. It removes a field from the form.
document.all.new_field1_c.parentNode.removeChild(d ocument.all.new_field1_c);
document.all.new_field1_d.parentNode.removeChild(d ocument.all.new_field1_d);
Can I made it visible after removing it?
- Posted by Michael Höhne on June 26th, 2008
Not easily. You should use element.style.display = "none" and
element.style.display = "" instead, where element is the HTML element to
hide or show. This only hides the field, but does not remove it from the
form.
--
Michael Höhne, Microsoft Dynamics CRM MVP
CRM Blog: http://www.stunnware.com/?area=blog
----------------------------------------------------------
"derya" <derya@discussions.microsoft.com> schrieb im Newsbeitrag
news:1693E80B-F568-48BB-AD10-97466B38DDB0@microsoft.com...
- Posted by derya on June 26th, 2008
As far as I understood, it is not possible to put back a field which was
removed? Hiding a field is ok, but a white space is a trouble in my case.
Thank you Michael.
"Michael Höhne" wrote:
- Posted by Michael Höhne on June 27th, 2008
Everything is possible, just a matter of time. Hiding has the same effect as
removing - from a user's perspective. If you want to hide entire lines
(rows), then try navigating up in the HTML tree until you find the next TR
or TABLE element and try hiding this instead.
--
Michael Höhne, Microsoft Dynamics CRM MVP
CRM Blog on http://www.stunnware.com
----------------------------------------------------------
"derya" <derya@discussions.microsoft.com> schrieb im Newsbeitrag
news:2CCF52E5-E3C8-462A-BA78-F88E2D5D5510@microsoft.com...
- Posted by derya on June 30th, 2008
After one day work, I have solved the problem. Thank you michael, especially
for "Everything is possible, just a matter of time." Now, I can remove both
the field and white space and reuse the removed field anywhere in the form.
"Michael Höhne" wrote: