# I cannot to get over a simple noobie hurdle

**URL:** <https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038>\
**Category:** RapidWeaver Classic\
**Created:** [October 27, 2018, 5:38pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038 "2018-10-27T17:38:47Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rfm](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@rfm](https://forums.realmacsoftware.com/u/rfm)\
**Post date:** [October 27, 2018, 5:38pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/1 "2018-10-27T17:38:47Z")

</div>

This code from arcLab presents a simple date & time on a page:

```
<p>Date/Time: <span id="datetime"></span></p> //put on the page
<script> //put in the header
var dt = new Date();
document.getElementById("datetime").innerHTML = dt.toLocaleString();
</script>

```

 ![43%20PM](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/c/ccd2b044cc28c3667b426a1c3eb122a412364549.png)

But, of course, it doesn’t work:

 ![13%20PM](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/e/e3191fc68c5808efb7e04e6913d53812522b6d1a.png)

---

<div class="post-metadata">

**Author:** ![instacks](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/instacks/32/23339_2.png) [@instacks](https://forums.realmacsoftware.com/u/instacks)\
**Post date:** [October 27, 2018, 5:52pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/2 "2018-10-27T17:52:45Z")

</div>

If you are able to publish this page, it makes it easier to check what’s wrong. I guess you entered the HTML  
part in a wrong way.

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [October 27, 2018, 6:46pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/4 "2018-10-27T18:46:55Z")

</div>

What I was going to say in the last post, I couldn’t edit for some reason…

Try removing the script tags and putting the js in the JavaScript area, put the html bit in wherever you want the date to show up.

---

<div class="post-metadata">

**Author:** ![instacks](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/instacks/32/23339_2.png) [@instacks](https://forums.realmacsoftware.com/u/instacks)\
**Post date:** [October 27, 2018, 6:55pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/5 "2018-10-27T18:55:35Z")

</div>

You are also able to put the whole content in the HTML Stack, just as is. You don’t have to separate it into Stacks page and header area.

---

<div class="post-metadata">

**Author:** ![rfm](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@rfm](https://forums.realmacsoftware.com/u/rfm)\
**Post date:** [October 27, 2018, 8:28pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/6 "2018-10-27T20:28:02Z")

</div>

Thanks for your input. This should be “stupid” simple. I grabbed the code from [https://www.arclab.com/en/kb/htmlcss/display-date-time-javascript-php-ssi.html](https://www.arclab.com/en/kb/htmlcss/display-date-time-javascript-php-ssi.html)

I simply brought a rudimentary html stack onto a new stacks page, pasted the code (above), then put the script into the header.

I can’t publish the page right now. I re-up’d with GoDaddy for my sites–and trying to save money, the tech had me migrate my websites to a new directory structure. I think something isn’t set right, but I think it’s on his end.

---

<div class="post-metadata">

**Author:** ![rfm](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@rfm](https://forums.realmacsoftware.com/u/rfm)\
**Post date:** [October 27, 2018, 8:31pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/7 "2018-10-27T20:31:28Z")

</div>

I’d actually put the script in the header area. I moved it to the javascript area. No change.

---

<div class="post-metadata">

**Author:** ![instacks](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/instacks/32/23339_2.png) [@instacks](https://forums.realmacsoftware.com/u/instacks)\
**Post date:** [October 27, 2018, 8:35pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/8 "2018-10-27T20:35:58Z")

</div>

Put all together into the HTML stack.

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [October 27, 2018, 8:39pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/9 "2018-10-27T20:39:43Z")

</div>

Did you get rid of the `<script> and </script>`

---

<div class="post-metadata">

**Author:** ![rfm](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@rfm](https://forums.realmacsoftware.com/u/rfm)\
**Post date:** [October 27, 2018, 8:59pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/10 "2018-10-27T20:59:44Z")

</div>

Your solution worked. Now, here’s the thing: is this approach the “right approach” long term for things of this nature?

---

<div class="post-metadata">

**Author:** ![rfm](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@rfm](https://forums.realmacsoftware.com/u/rfm)\
**Post date:** [October 27, 2018, 11:05pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/11 "2018-10-27T23:05:13Z")

</div>

THanks for the input. I tried getting rid of the tags - no change.

---

<div class="post-metadata">

**Author:** ![instacks](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/instacks/32/23339_2.png) [@instacks](https://forums.realmacsoftware.com/u/instacks)\
**Post date:** [October 28, 2018, 8:11am UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/12 "2018-10-28T08:11:03Z")

</div>

That depends on the code. In that case, the JS Code had to be “below” the HTML code.

If you rewrite the JS code, it will work in header also.

---

<div class="post-metadata">

**Author:** ![rfm](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@rfm](https://forums.realmacsoftware.com/u/rfm)\
**Post date:** [October 28, 2018, 8:15am UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/13 "2018-10-28T08:15:48Z")

</div>

Thanks very much for your help.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/system/32/25301_2.png) [@system](https://forums.realmacsoftware.com/u/system)\
**Post date:** [November 27, 2018, 6:15pm UTC](https://forums.realmacsoftware.com/t/i-cannot-to-get-over-a-simple-noobie-hurdle/23038/14 "2018-11-27T18:15:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
