Forum Moderators: coopster

Message Too Old, No Replies

php_include vs. css_js drop down menu

page opens ok in regular global css/js but flunks when included in template

         

russgri

1:50 am on May 15, 2003 (gmt 0)

10+ Year Member



file name toc.html contains the code below and resolves with collapsed mode...the correct way...but when included in template as includes/pageHead.inc with identical code the links resolve as expanded and will toggle back to collapse and vice=versa but just the opposite mode needed.

the calling code...
<code>
<div class="cssref" style="position: relative;" onmouseover="msover();" onmouseout="msout();" onclick="toggle('about');">About</div>

<div id="about" style="position: relative; display: 'inline';">
<a href="../about/index.html">About Us</a><br>

</div>
</code>
The Javascript...
<code>
<script language=javascript>
<!--
ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
function msover(){
if (ie4){
event.srcElement.style.color="red";
event.srcElement.style.cursor = "hand";
}
}

function msout(){
if (ie4){
event.srcElement.style.color="gold";
event.srcElement.style.cursor = "auto";
}
}

function toggle( targetId ){
if (ie4){
target = document.all( targetId );
if (target.style.display == "none"){
target.style.display = "";
} else {
target.style.display = "none";
}
}
}
//-->
</script>

</code>
The css...I think the hidden is not relevant but?
<code>
#hidden {font-size: 11px; line-height: 10pt; margin-left: 2em;}
.cssref {font-size: 11px; line-height: 10pt; color: #000;margin-left: .3em}
#about {font-size: 9pt;line-height: 10pt;margin-left: .3em}

</code>

jatar_k

3:54 pm on May 15, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



not sure really, have you looked at the including page for any differences?

russgri

4:23 pm on May 15, 2003 (gmt 0)

10+ Year Member



I have found the culprit.

Remove DocType...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

Which poses a problem for future use.

How can I update this to accept a more strict environment?

jatar_k

4:31 pm on May 15, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



that would definitely be a browsers question. You could maybe post over there to get the full advantage of the folk that are wandering around.