[thelist] Javascript help to make it cross-platform
David U.
davidu at everydns.net
Sat Nov 23 03:20:01 CST 2002
Hi Evolters,
In my never-ending quest to move things away from the server side tire or
"click, wait, see, click, wait, do" I'm trying to do something nifty with
javascript to display a right side bar frame "help" bar for my users.
Here's the page:
http://dev.everybox.com/frame
in IE this works. In mozilla and chimera on the mac it's broken.
Here is frame's src:
<html>
<head>
<script language="JavaScript1.2">
defaultconf=''
function expandf()
{
if (document.all) {
if (document.body.cols!="*,200")
document.body.cols="*,200"
else
document.body.cols=defaultconf
}
}
</script>
<frameset cols="*,0">
<frame src="main" name="mainwin" frameborder="no" scrolling="auto"
noresize />
<frame src="help" name="help" frameborder="no" noresize />
</frameset>
</html>
Here is help's src:
<html>
<head>
<title>Test page</title>
</head>
<script language="JavaScript1.2">
if (document.all)
window.parent.defaultconf=window.parent.document.body.cols
</script>
</head>
<body bgcolor="#ffffcc">
<div onclick="window.parent.expandf()">[close]</div>
</body>
</html>
Any idea how I can make expandf() more crossplatform?
I'm not javascript user and the using google to diagnose javascript is
"hard" ;-/
thanks,
davidu
--
"Never doubt that a small group of thoughtful citizens can change the
world. Indeed, it is the only thing that ever has." --Margaret Mead
More information about the thelist
mailing list