Posted April 3 '03 at 01:08 AM
Posts: 11
Well, eventually I was able to get the test script to work as well... except that the code for my production site is very similar to the test script. HOWEVER, my production site utilizes frames. The Javascript DOM code runs from one frame, and renders layers into another frame. The one frame is hidden, and the frame that is rendered into takes the entire browser window area... so to the user it looks like there aren't ANY frames.
Here's the code I'm using on my production site:
_DOC = parent.DISPFRAME.document;
_DOC.open();
_DOC.clear();
_DOC.close();
if (_DOC.createStyleSheet)
_DOC.createStyleSheet("ffae.css");
else
{
_TEMP_OUTP = _DOC.createElement("LINK");
_TEMP_OUTP.setAttribute("REL","stylesheet");
_TEMP_OUTP.setAttribute("TYPE","text/css");
_TEMP_OUTP.setAttribute("HREF","ffae.css");
_DOC.getElementsByTagName("HEAD").item(0).appendChild(_TEMP_OUTP);
}
_DOC.title = "mysite.com";
_DOC.body.bgColor = getBGColor();
_DOC.body.text = "#FFFFFF";
_DOC.body.link = "#FFFFFF";
_DOC.body.vLink = "#FFFFFF";
_DOC.body.aLink = "#0000FF";
// _DOC.body.style.marginLeft = "0";
// _DOC.body.style.marginTop = "0";
// _DOC.body.style.marginRight = "0";
// _DOC.body.style.marginBottom = "0";
_DOC.body.leftmargin = 0;
_DOC.body.topmargin = 0;
_DOC.body.rightmargin = 0;
_DOC.body.bottommargin = 0;
// _DOC.body.marginwidth = 0;
// _DOC.body.marginheight = 0;
// Render the layers on-screen
createLayer("bgLayer",0,0,58,100,"LEFT","TOP",1,getBGColor());
As you can see, I've tried a bunch of different ways to get rid of the margins. Just doesn't let me.
Now, the big difference between this code and my test code is that here, I'm calling an external CSS style sheet into use. But I don't see why that would matter. Furthermore, I even tried putting margin style values into my CSS file itself, and it STILL didn't do anything.
So now I'm thinking it has something to do with the frames.
Any thoughts or insights?
- skubik.