What is $$HTMLHead good for?

What is the use of $$HTMLHead despites there being a field/property called HTML Head Content?
Who is Participating?
CRAKConnect With a Mentor Commented:
Window title is of course meant to store the title only. Not e.g. meta-statements which can be stored in $$HTMLHead and HTML Head Content.
These two do not have a whole lot of differences. HTML Head Content is always there, ready to use. $$HTMLHead being a field, can not be used on pages. On the other hand, you could use $$HTMLHead as a shared field. Both may have an advantage.
JS Header is meant to add JS functions etc. You can't use any @functions though. Starting a <SCRIPT> area in $$HTMLHead or HTML Head Content may provide that advantage, but the numerous nested (single / double) quotes will easily make you lose track....
IMO: very often is a matter of personal taste or compatibility. Not much more than that.
The $$HTMLHead field is the R4.5 / 4.6 equivalent for HTML Head as introduced in R5.
CRAK means JS Header.
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

No I don't.

Create a hidden text field called "$$HTMLHead" (computed for display) with following formula:
"<TITLE>Test 1</TITLE>"

Then put following in HTML Head Content of the same form:
"<TITLE>Test 2</TITLE>"

Preview in a browser and view source:
You'll have 2 title entries in the header.

If you start <Script language=...> etc. in either one of those to store JS vars and functions, then yes: you may just as well use JS Header.
small_doubtsAuthor Commented:
So, what does it mean to have both of them in a form? Can I do that? How will it affect the form?

Good one madheeswar :)
small_doubtsAuthor Commented:
I toyed with all 4 trying to set a TITLE. JS Header takes precedence. The order of HTML generation is $$HTMLHead, Window Title, HTML Head content, JS Header.

Any subtle differences I should know about?
small_doubtsAuthor Commented:
Nice points. Thanks CRAK.
One more comment:
I often put HTML right on my page or form in a <SCRIPT> area (pass-through html, hidden for notes). Very useful to pass fieldvalues of computations to JS vars:

<Script language="Javascript">
function getDbPath()
   myPath = '<computed value or field>';

Where <computed value or field> can be anything like:
@If(myField=""; "empty"; myField)


Thanks for the points!
small_doubtsAuthor Commented:
You are helpful and quick too. Thanks.
I've put a new design to test. Those servers are extremely slow. Every click allows me to get coffes for the entire neigborhood, read the paper or do anything else. So much to do, so much to keep my head to and I can hardly continue.
This one was easy enough to start another thread using a brain cell that I found off duty.
small_doubtsAuthor Commented:
That's nice. Hope you always have loads of time to help people like like us :)
I wish.... but I try!
The major use of HTML HEad as far as i have seen is mix of javascript and formula

for ex:

Just put this code in HTML HEad'

"<script>var isnewdoc = ;"+@if(@isnewdoc;"1";"0") +"'</script>"

Now u can use isnewdoc anywhere in your javascript.

small_doubtsAuthor Commented:
Thanks partha. I hope i will return with more doubts soon :) CRAK has been a good help too :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.