# DHTML ~vs~ JavaScript

**URL:** <https://boards.straightdope.com/t/dhtml-vs-javascript/289050>\
**Category:** Factual Questions\
**Created:** [February 8, 2005, 7:39pm UTC](https://boards.straightdope.com/t/dhtml-vs-javascript/289050 "2005-02-08T19:39:24Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Arwin](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@Arwin](https://boards.straightdope.com/u/Arwin)\
**Post date:** [February 8, 2005, 11:17pm UTC](https://boards.straightdope.com/t/dhtml-vs-javascript/289050/21 "2005-02-08T23:17:01Z")

</div>

> [@LookingAround](#):
>
> I’ll make it easier, find a script (pure javascript no relation to DHTML) that has pop-ups that can get by most pop-up blockers. There is a difference, even in the coding.

There’s limits to the help I’m prepared to give you on this. Pop-up blockers, after all, exist for a reason. :wally

---

<div class="post-metadata">

**Author:** ![Gary\_Robson](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/gary_robson/32/3448_2.png) [@Gary\_Robson](https://boards.straightdope.com/u/Gary_Robson)\
**Post date:** [February 9, 2005, 4:03am UTC](https://boards.straightdope.com/t/dhtml-vs-javascript/289050/22 "2005-02-09T04:03:54Z")

</div>

> [@Joe Random](#):
>
> There’s really no such thing as a simple JavaScript clock. You see, the JavaScript has to be able to somehow change the numbers displayed in the browser, and I don’t know of any way to do that _other than_ using DHTML.

No problem at all. The numbers can be images, and JavaScript is quite good at swapping images around. No DHTML required (and it would be pretty darned browser independent, too!). Ditto if the clock consists of text in a form. Or the clock could be in a different frame, and the JavaScript just reloads a blank page each minute (or second) and writes the current time into it.

There are _lots_ of ways to make a JavaScript clock without DHTML.

---

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [February 9, 2005, 7:19am UTC](https://boards.straightdope.com/t/dhtml-vs-javascript/289050/23 "2005-02-09T07:19:03Z")

</div>

> [@Terminus Est](#):
>
> Those are both JavaScript, or ECMAscript if you prefer. One may be more comprehensible to you than the other, but they’re both using the same core language.

No kidding. Those two examples are nearly functionally identical. One uses setTimeout and one uses setInterval. That’s about the biggest non-cosmetic difference.

> [@InvisibleWombat](#):
>
> No problem at all. The numbers can be images, and JavaScript is quite good at swapping images around. No DHTML required (and it would be pretty darned browser independent, too!).

I think what some people here are getting at is that when you have client-side scripts (e.g. javascript) altering properties (e.g. the “src” property) of HTML elements (e.g. the “img” element), that’s called DHTML.

[Previous page](https://boards.straightdope.com/t/dhtml-vs-javascript/289050.md?page=1)
