I am trying to create a clean looking chat using AJAX and I want to pass to the page the size of the frame so that it will look good on almost any resolution and I can manipulate the number for each part of the chat's size.
So I found a few functions on the internet and wrote some javascript to do that and then change the frame and provide the height as a parameter in the URL.
However, the frames worked before and now it just displays a blank page here is my HTML and Javascript code.
<html>
<head>
<script type="text/javascript">
function getFrameHeight(frameID) {
var result = 0;
if(document.getElementById) {
var frame = parent.document.getElementById(frameID);
if(frame.scrollWidth) {
result = frame.scrollHeight;
}
}
}
function doLoad() {
setTimeout("changeFrame()", 1500);
}
function changeFrame() {
x = document.getElementById("chat");
x.changeFrame("Chat/index.asp?height=" + getFrameHeight("chat"))
}
</script>
</head>
<body onload="doLoad()"></body>
<frameset rows="75%,25%"><frame src="dragoth/default.asp?message=%203%20turns%20have%20been%20added%20to%20your%20account" name='content'></frameset>
<frameset cols="75%,25%"><frame src="Chat/chatpreloader.asp" id="chat"><frame src="online.asp"></frameset></html>

New Topic/Question
Reply


MultiQuote



|