<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
What would you do if element A was a textarea and element B was an
htmlarea? I was asked to help on a project recently for this very same
thing. <a class="moz-txt-link-freetext" href="http://xinha.gogo.co.nz/cgi-bin/trac.cgi/ticket/74">http://xinha.gogo.co.nz/cgi-bin/trac.cgi/ticket/74</a><br>
I would prefer to use the display idea but that might cause more
problems when the user submits the form. A clear cut solution would be
to put everything back to the way it was. <br>
Best Cookies,<br>
Judah<br>
<br>
<br>
Shawn Milo wrote:
<blockquote cite="mid2dc0c81b050323055255fdbe19@mail.gmail.com"
 type="cite">
  <pre wrap="">In this case, I like to put each object in a DIV, and play with the visibility.

Shawn



Use this:

theObject.style.display = "none";
or
theObject.style.display = "block";


Do whatever on the onchange() of the checkbox.

Declare one of the objects like this in the HTML:
&lt;div id=weeklyStart style="display:none;"&gt;
put object here
&lt;/div&gt;


That way, one will be invisible by default.

I have used this to have a retail sales report which has
monthly, weekly, and daily views all on one page.  When you select
'weekly,' for example, it makes the start/end week options appear, 
and the month or day boxes disappear. You get the idea.

Shawn



On Wed, 23 Mar 2005 00:43:38 -0600, Peter Brunone <a class="moz-txt-link-rfc2396E" href="mailto:peter@brunone.com">&lt;peter@brunone.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">        Well, the nice IE way is to use the outerHTML property and just
gut the whole thing (it's pretty fast, too).

        If that's not an option, you could have both elements at the
same point in your code and alternately set their height and width to
0px (I tried display:none but Netscape 7 doesn't support it).

Cheers,

Peter

-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:javascript-bounces@LaTech.edu">javascript-bounces@LaTech.edu</a> On Behalf Of judah

I was curious how to replace a element with another element when the
user clicks a checkbox. If checkbox is enabled then replace element A
with B (erase A). If checkbox is unchecked then replace element B with A

(erase B).

Best Regards,
Judah

_______________________________________________
Javascript mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.LaTech.edu/mailman/listinfo/javascript">https://lists.LaTech.edu/mailman/listinfo/javascript</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
</body>
</html>