this is the code of my masterpage:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="3" MadCap:lastHeight="134" MadCap:lastWidth="946">
<head>
<link href="../Stylesheets/wawi.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
window.onload = bodyanpassenLang;
window.onresize = bodyanpassenKurz;
function bodyanpassenLang () {
if (document.all)
{
if (document.all.headerzeile.style.getAttribute)
{
var hoehe = document.all.headerzeile.offsetHeight + 38;
if (document.all.topic.style.setAttribute)
{
document.all.topic.style.setAttribute("paddingTop", hoehe);
document.all.headerzeile.style.setAttribute("top", 28);
document.all.headerzeile.style.setAttribute("zIndex", 1);
var breite = document.body.offsetWidth;
document.all.headerzeile.style.setAttribute("width", breite);
document.all.toolbaroben.style.setAttribute("visibility", "visible");
document.all.toolbaroben.style.setAttribute("left", 0);
document.all.toolbaroben.style.setAttribute("top", 0);
document.all.toolbaroben.style.setAttribute("right", 0);
document.all.toolbaroben.style.setAttribute("zIndex", 2);
document.all.toolbaroben.style.setAttribute("width", breite);
}
}
}
var adresse = document.URL;
var hatmarke = adresse.split("#");
anzahllinks = document.anchors.length;
if (document.anchors)
{
for (var zaehler = 0; zaehler < anzahllinks; zaehler++)
{
alert("hi there");
}
}
}
function bodyanpassenKurz () {
if (document.all)
{
if (document.all.headerzeile.style.getAttribute)
{
var hoehe = document.all.headerzeile.offsetHeight + 38;
if (document.all.topic.style.setAttribute)
{
document.all.topic.style.setAttribute("paddingTop", hoehe);
document.all.headerzeile.style.setAttribute("top", 28);
document.all.headerzeile.style.setAttribute("zIndex", 1);
var breite = document.body.offsetWidth;
document.all.headerzeile.style.setAttribute("width", breite);
document.all.toolbaroben.style.setAttribute("visibility", "visible");
document.all.toolbaroben.style.setAttribute("left", 0);
document.all.toolbaroben.style.setAttribute("top", 0);
document.all.toolbaroben.style.setAttribute("right", 0);
document.all.toolbaroben.style.setAttribute("zIndex", 2);
document.all.toolbaroben.style.setAttribute("width", breite);
}
}
}
}
</script>
</head>
<body id="topic">
<div id="toolbaroben" class="toolbardiv">
<MadCap:topicToolbarProxy class="aw_toolbar" />
</div>
<MadCap:bodyProxy />
</body>
</html>
The text editor and the error message on preview and build look like this: - The "<" starts the funny outfit of the text in the text editor, the ">" puts an end to it.
- If I insert the script in any other place (body, separate file), either I get other error messages or the topic toolbar isn't there: The topic toolbar is generated, displayed and handled by a MC js. My js seems to interfere ...
Apart from the syntax bugs in the loop (picture, not code): Does anybody have a way out for me? I need a loop at that point ...
Thanx!
Inge