Closed Thread Icon

Preserved Topic: what is the problem, anyone? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17687" title="Pages that link to Preserved Topic: what is the problem, anyone? (Page 1 of 1)" rel="nofollow" >Preserved Topic: what is the problem, anyone? <span class="small">(Page 1 of 1)</span>\

 
eedn
Bipolar (III) Inmate

From: Midlothian, VA USA
Insane since: Mar 2000

posted posted 03-14-2000 21:56

Hi, I'm kinda new to this so forgive me if I do something stupid. I'm having this problem getting some 'divs' to position themselves and actually show up in Netscape. I've included the code below. If anyone can clue me in to what's wrong with it I'd appreciate it. Coding dHTML for Netscape bugs the crap out of me. Thanks in advance.<P>ben<P><html><P><head>
<title>New Page 2</title><P><style type="text/css">
.section {position: absolute; top: 0; left: 0; height: 30; width: 245; visibility: visible}
.annex {position: absolute; top: 0; left: 44%; height: 30; width: 245; visibility: visible}
.date {position: absolute; top: 16; left: 88%; height: 5; width: 110; visibility: visible}
</style><P><script Language="JavaScript">
< !--
function putdate() {
ThisDate=new Date();
thismonth=ThisDate.getMonth()+1;
if (thismonth=="1") {month="Jan"};
if (thismonth=="2") {month="Feb"};
if (thismonth=="3") {month="Mar"};
if (thismonth=="4") {month="Apr"};
if (thismonth=="5") {month="May"};
if (thismonth=="6") {month="Jun"};
if (thismonth=="7") {month="Jul"};
if (thismonth=="8") {month="Aug"};
if (thismonth=="9") {month="Sep"};
if (thismonth=="10") {month="Oct"};
if (thismonth=="11") {month="Nov"};
if (thismonth=="12") {month="Dec"};
theDate=ThisDate.getDate()+' '+month+' 2000';
document.write(theDate);
}
//-->
</script>
</head><P><body topmargin="0" leftmargin="0" bgcolor="#333399">
<div id="section" class="section"><img src="../images/bluedot.gif" width="245" height="30" name="section"></div>
<div id="annex" class="annex"><img src="../images/bluedot.gif" width="84" height="30" name="annex"></div>
</font></div>
</body>
</html><p>[This message has been edited by DocOzone (edited 14-03-2000).]

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-14-2000 22:49

Hmm, well THAT didn't work too well! What to do, if I turn HTML handling off, we can't add fun little bits to our posts, and if I do, we can't view code! I'm going to see if I can disable HTML in this forum area only, and see how that works. FWIW, perhaps you could post a pointer to where that broken code might live on the web? It's always easier when you can see the code in action (or not, as the case may be! :-)<P>Your pal, -doc-
<P>------------------
----- Doctor Thaddeus Ozone --------- "Specialization is for insects"---
  --- OZONE pages .................................. http://www.ozones.com/
    - Hands-On Tutorials ............ http://www.ozones.com/handson/

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-14-2000 23:00

OK; I turned off HTML and reloaded this piece, updating your post so we could view the HTML. I notice you're starting your styles with<P>.divname<P>etc..., try using a pound sign instead...<P>#divname<P>The dots should be for classes, and it could be flipping out because you have a div and a class named the same. Try leaving out the class altogether, and just specify the #div instead.<P>Your pal, -doc-<P>
------------------
----- Doctor Thaddeus Ozone --------- "Specialization is for insects"---
  --- OZONE pages .................................. http://www.ozones.com/
    - Hands-On Tutorials ............ http://www.ozones.com/handson/<p>[This message has been edited by DocOzone (edited 14-03-2000).]

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-14-2000 23:02

Ooh! You might not want to name your images the same either, same problem.<P>-doc-
<P>------------------
----- Doctor Thaddeus Ozone --------- "Specialization is for insects"---
  --- OZONE pages .................................. http://www.ozones.com/
    - Hands-On Tutorials ............ http://www.ozones.com/handson/

eedn
Bipolar (III) Inmate

From: Midlothian, VA USA
Insane since: Mar 2000

posted posted 03-14-2000 23:10

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by DocOzone:
OK; I turned off HTML and reloaded this piece, updating your post so we could view the HTML. I notice you're starting your styles with<P>.divname<P>etc..., try using a pound sign instead...<P>#divname<P>The dots should be for classes, and it could be flipping out because you have a div and a class named the same. Try leaving out the class altogether, and just specify the #div instead.<P>Your pal, -doc-<P><HR></BLOCKQUOTE><P>Yeah I tried that and had the same problem. I'll try the image name thing.<P>ben<P><P>------------------

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-14-2000 23:42

Use the pound sign, #, for an id="". This can only be used once per HTML page - only one div tag can use that ID.<P>Use the period, ., for a class="". Classes can be used for multiple div tags.<P>In your case, you want to use the # - you should almost always use that for absolute positioning.<P>------------------
<a href="http://www.angelfire.com/ma/slimesareneat"></a>

eedn
Bipolar (III) Inmate

From: Midlothian, VA USA
Insane since: Mar 2000

posted posted 03-14-2000 23:46

Well here's the code with some slight revisions. I've checked it out and it seems that it might be the Date function. Do you see anything wrong with it? You can see I've changed the third layer to write text instead and it works. It lokks like I'll have to try a different date function. If you find anything interesting let me know and thanks again.<P>ben<P>
<P>------------------

eedn
Bipolar (III) Inmate

From: Midlothian, VA USA
Insane since: Mar 2000

posted posted 03-14-2000 23:47

Whoops! Here it is.<P>
<html><P><head>
<title>New Page 2</title>
<style type="text/css"><P>#section {position: absolute; top: 0; left: 0; height: 30; width: 245; visibility: visible; border: 1px solid #ffffff}
#annex {position: absolute; top: 0; left: 44%; height: 30; width: 84; visibility: visible; border: 1px solid #ffffff}
#date {position: absolute; top: 16; left: 88%; height: 5; width: 110; visibility: visible; border: 1px solid #ffffff}<P></style>
<script Language="JavaScript">
<!--
/*function putdate() {
ThisDate=new Date();
thismonth=ThisDate.getMonth()+1;
if (thismonth=="1") {month="Jan"};
if (thismonth=="2") {month="Feb"};
if (thismonth=="3") {month="Mar"};
if (thismonth=="4") {month="Apr"};
if (thismonth=="5") {month="May"};
if (thismonth=="6") {month="Jun"};
if (thismonth=="7") {month="Jul"};
if (thismonth=="8") {month="Aug"};
if (thismonth=="9") {month="Sep"};
if (thismonth=="10") {month="Oct"};
if (thismonth=="11") {month="Nov"};
if (thismonth=="12") {month="Dec"};
theDate=ThisDate.getDate()+' '+month+' 2000';
document.write(theDate);
}*/
//-->
</script>
</head><P><body topmargin="0" leftmargin="0" bgcolor="#333399">
<div id="section">
<img src="../images/bluedot.gif" width="245" height="30" name="one">
</div>
<div id="annex">
<img src="../images/bluedot.gif" width="84" height="30" name="two">
</div>
<div id="date"><font face="Verdana" size="1" color="#ffffff">
<script language="JavaScript">
document.write("theDate");
</script>
</font></div>
</body>
</html>

eedn
Bipolar (III) Inmate

From: Midlothian, VA USA
Insane since: Mar 2000

posted posted 03-14-2000 23:54

Hey slime-
Was it you that was trying to find a better server at the beginning of the month? If it was, then check out www.arealcity.com. Unless they've changed in the past couple weeks, they don't have any pop-ups or banner ads as far as I can tell and you get 20 megs I believe. <P>ben

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-15-2000 21:02

Hmmm... I'll check it out.<P>I don't see anything wrong with the PutDate() function in your code, off the bat.<P>Is it just me, or does the font size change after the first paragraph of a post?

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-15-2000 21:04

Hmm? No font size changes that I can detect, what browser/platform are you using, I'll test it.<P>-doc-

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-16-2000 00:09

I'm using IE 5.0 on Windows 95. This paragraph looks about size 12 font, but<P>this one is only about half as big.

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-16-2000 08:38

Hey! I think I tracked that down, I'm using style sheets in my header, but the perl script also drops <font> tags in as well. I notice and inserted <p> tag there, and I know that one is defined. I like the smaller 10px verdana font, which looks best to you, the big or the small? I'll do what I can there...<P><P>------------------
----- Doctor Thaddeus Ozone --------- "Specialization is for insects"---
  --- OZONE pages .................................. http://www.ozones.com/
    - Hands-On Tutorials ............ http://www.ozones.com/handson/

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-17-2000 00:04

The small is just a little too small for me. Can you try 11pt font?

eedn
Bipolar (III) Inmate

From: Midlothian, VA USA
Insane since: Mar 2000

posted posted 03-17-2000 04:54

Yeah, the font changes for me too. Well, I figured out the problem and have corrected it. For some reason (correct me if I'm wrong) I've found that the whole date code has to be in the same place in the body. When I had the function in the <head> and called it from the body it wouldn't work. Also, the comment arrows (<!--) screwed with Netscape ONLY when placed in the body of the document - what the hell is that? Has anyone else noticed this? One last thing...I also noticed that when I defined a variable in the head section and then tried a document.write(var) later in the body, Netscape has no idea what's going on. They seem to have to be defined within the same <script> section and not as globals in the <head>. Am I missing something? Does Netscape suck or have I been brainwashed by Microsoft? Hmmmm...
Here is the new code:<P><html><P><head>
<title>New Page 2</title><P><style type="text/css">
#section {position: absolute; top: 0; left: 0; height: 30; width: 245; visibility: visible}
#annex {position: absolute; top: 0; left: 44%; height: 30; width: 245; visibility: visible}
#date {position: absolute; top: 16; left: 88%; height: 10; width: 110; visibility: visible}
</style>
</head><P><body topmargin="0" leftmargin="0" bgcolor="#333399">
<div id="section"><img src="../images/bluedot.gif" width="245" height="30" name="section"></div>
<div id="annex"><img src="../images/bluedot.gif" width="84" height="30" name="annex"></div>
<div id="date"><font face="Verdana" size="1" color="#ffffff">
<script Language="JavaScript">
thisDate = new Date();
thisMonth = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
trueMonth = thisDate.getMonth();
theDate = thisDate.getDate()+' '+ thisMonth[trueMonth] +' 2000';
document.write(theDate);
</script>
</font></div>
</body>
</html><P>This seems to work a helluva lot better because of the previously mentioned reasons.<P>------------------<P>
[This message has been edited by eedn (edited 17-03-2000).]<p>[This message has been edited by eedn (edited 17-03-2000).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-17-2000 20:54

That shouldn't be the problem. I always put ALL my JS code in the head (except for document output and event handlers), and Netscape never gave me any trouble for it. What version of Netscape?

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-17-2000 21:38

Hmm, I tend to put my javascript in all sorts of odd places in the document, for loading order reasons. I wonce had to tweak the visi.com site to eliminate a millisecond lapse noticed by the sysadmins, connected right to the server with 100Mb ether. Solution? Strip the javascript out of the head and place it in the bottom, with only a short little script in the head to set default values and such.<P>Netscape has a real problem when you put your javascript inside a <div>, could that be the problem?<P><P>------------------
----- Doctor Thaddeus Ozone --------- "Specialization is for insects"---
  --- OZONE pages .................................. http://www.ozones.com/
    - Hands-On Tutorials ............ http://www.ozones.com/handson/

« BackwardsOnwards »

Show Forum Drop Down Menu