October 15th, 2002, 05:57 PM
Join Date: Oct 2001
Time spent in forums: 2 h 49 m 47 sec
Reputation Power: 13
Meta tages & CSS using DOM functions?
I'm using DOM functions from one frame to create layers in another frame, which is empty, initially. The frameset is defined below.
My site initally defines a frameset that opens a page into a 'hidden' frame (CONTROLFRAME), that then calls functions
to render the site in the visible frame (DISPFRAME):
<FRAMESET ROWS="50%,*" SCROLLING=AUTO NORESIZE BORDER=0>
<FRAME SRC="domcontrol.html" NAME=CONTROLFRAME SCROLLING=NONE NORESIZE>
<FRAME SRC="about:blank" NAME=DISPFRAME SCROLLING=NONE NORESIZE>
I have been able to now successfully render layers, and other things into the blank 'DISPFRAME' using DOM functions, createElement, appendChild, etc.
Before I implemented the use of DOM functions, I explicitly called
document.write() from the CONTROLFRAME to write HTML into the DISPFRAME.
When I did this, I wrote ALL the HTML, including the
<HTML><HEAD><TITLE>....., etc. However, I also had two <META> tags and a <LINK> tag written as well, but since I've now abandoned that explicit writing, I don't have those tags defined in the document head anymore.
So my question is: Is there a way to create these tags using DOM functions as well?
I've tried the following code, but it didn't seem to work:
var _TEMP_OUTP = top.DISPFRAME.document.createElement("META");
... and ...
var _TEMP_OUTP01 = top.DISPFRAME.document.createElement("LINK");
How else might I be able to create these tags?
I've also tried top.DISPFRAME.document.getElementsByTagName("BODY").appendChild(_TEMP_OUTP01);