I am attempting to convert a layout that is currently using frames that works perfectly having a fixed header (this section needs to be named Banner) and a frame on the bottom that scrolls whenever a user posts something in the chatroom (named Body). This works great for frames. I was looking at another conversion post here on stack and trying to use it.
The frame coding is:
<html>
<head><title>$main:roomname$</title></head>
<frameset cols="100%"><frameset rows="120,*">
<frame name="BANNER" src="$BASE$/BANNER?$CONFIG$" scrolling="AUTO" marginheight="1">
<frameset cols="*,140" FRAMEBORDER=YES FRAMESPACING=2 BORDER=2>
<frame name="BODY" src="$BASE$/BODY?$CONFIG$" scrolling="YES">
<noframes>
<body>
Frames are required, sorry folks.
</body>
</noframes>
</frameset></frameset>
</html>
What I'm trying to do is below. The room name pulls and shows as it should for the browser, but it doesn't pull any of the other information. It just shows a white screen.
edit Trying out more coding when I view the page source after trying to load it, it shows the full url pulled from $BASE$/BODY?$CONFIG$ , it just doesn't display it inside the Div like I want it to.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="http://code.jquery.com/jquery-1.10.1.js"></script>
<script src="script.js"></script>
<title>$main:roomname$</title>
<script>
$(document).ready(function(){
$("#BANNER").load("$BASE$/BANNER?$CONFIG$");
});
</script>
<script>
$(document).ready(function(){
$("#BODY").load("$BASE$/BODY?$CONFIG$");
});
</script>
<style>
.BANNER {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 140px;
overflow: hidden;
}
.BODY {
position: absolute;
top: 150px; /* 140px (header) + 10px top padding */
left: 10px; /* 10px padding */
right: 10px; /* 10px padding */
bottom: 10px; /* 10px padding */
overflow: auto;
}
</style>
</head>
<body>
<div id="BANNER"></div>
<div id="BODY"></div>
</body>
</html>
edit 2** with suggestions from below.